Core Components
Number Effects
Interactive Elements
Advanced Effects
Radix UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Base UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Image Comparison#
Interactively compare two images with a draggable slider to reveal differences.
Examples#
Image Comparison Basic#


Image Comparison with hover#


Image Comparison with spring options#


Image Comparison with custom slider#


Installation#
npx shadcn@latest add "https://components.dylanwlim.com/c/image-comparison.json"
Component API#
ImageComparison#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | React.ReactNode | ImageComparisonImage components. | |
| className | string | undefined | Optional CSS class for styling the component. |
| enableHover | boolean | false | Controls whether hover effects are enabled. |
| springOptions | SpringOptions | { bounce: 0, duration: 0 } | Options for customizing the spring animation. |
ImageComparisonImage#
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | undefined | Optional CSS class for styling the component. |
| alt | string | The alt text for the image. | |
| src | string | The source URL of the image. | |
| position | 'left' | 'right' | 'left' | The position of the image. |
ImageComparisonSlider#
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | undefined | Optional CSS class for styling the component. |
Build with DWL Components
Use the copied registry, charts, blocks, and create tools in one place.
Start from the DWL Components create flow and customize from there.
Open DWL Components Create