Image Comparison
Drag-to-reveal before/after slider. Works with images or any React content, supports touch and arrow keys.
Import
import { ImageComparison } from "@igorao79/uivix";Examples
Default
Drag the handle
After
Before
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| before | ReactNode | - | Content on the left of the handle |
| after | ReactNode | - | Content on the right of the handle |
| initial | number | 50 | Initial handle position (0–100) |
| className | string | - | Additional CSS classes |