Compare a before & an after under one divider, dragged across or moved with the arrow keys.
View as MarkdownInstallation
Component API
| Prop | Type | Default | Description |
|---|---|---|---|
before | string | - | The picture on the left, before the change. |
| The picture on the left, before the change. | |||
after | string | - | The picture on the right, after it. |
| The picture on the right, after it. | |||
alt | string | - | What both pictures show, for screen readers. |
| What both pictures show, for screen readers. | |||
beforeLabel | string | Before | |
afterLabel | string | After | |
defaultPosition | number | 50 | Where the divider starts, in percent from the left. |
| Where the divider starts, in percent from the left. | |||
aspectRatio | string | 16 / 10 | The frame's width over its height, such as 16 / 10. |
The frame's width over its height, such as 16 / 10. | |||
shape | none | rounded | pill | rounded | |
className | string | - | |
focus | boolean | string | true | |