Installation
Run the following command
npx shadcn@latest add https://ui.aceternity.com/registry/compare.json https://ui.aceternity.com/registry/sparkles.json
Examples
Standard
Autoplay
Drag Mode
Props
Prop | Type | Default | Description |
---|---|---|---|
firstImage | string | "" | URL of the first image |
secondImage | string | "" | URL of the second image |
className | string | undefined | Additional CSS classes for the container |
firstImageClassName | string | undefined | Additional CSS classes for the first image |
secondImageClassname | string | undefined | Additional CSS classes for the second image |
initialSliderPercentage | number | 50 | Initial position of the slider (0-100) |
slideMode | "hover" | "drag" | "hover" | Mode of interaction for the slider |
showHandlebar | boolean | true | Whether to show the slider handle |
autoplay | boolean | false | Enable automatic sliding |
autoplayDuration | number | 5000 | Duration of one autoplay cycle in milliseconds |
Build websites faster and 10x better than your competitors with Aceternity UI Pro
With the best in class components and templates, stand out from the crowd and get more attention to your website. Trusted by founders and entrepreneurs from all over the world.
Excellent communication and professionalism from the start and
throughout. Happily and calmly accepted and entertained a few additional
out-of-scope requests as well. Good open-...
Henrik Söderlund
Former CTO at Creme Digital