Compare Slider
A before/after slider for any two views. While you drag, the divider bends, the view it moves toward slides with a motion blur and a color split, and dots spray off it.


Dependencies
motionTags
comparisondragtheme
Frequently asked questions
- How do I install the Compare Slider?
- Run npx shadcn@latest add @aceternity/compare-slider. Before installing, add the Aceternity Pro registry to your components.json and set your API token as the ACETERNITY_PRO_TOKEN environment variable. The CLI adds the file to components/interactions/compare-slider.tsx and installs Motion. You can also ask an agent with the shadcn MCP server connected, or copy the prompt with the full source into any AI tool.
- Is the Compare Slider included with All-Access?
- Yes. Interactions are included with the Aceternity UI All-Access plan (1-Year License, Lifetime, or an active yearly subscription). Anyone can play with the preview and the controls; All-Access unlocks the code, the CLI and MCP install, and the prompt.
- Can I change how the Compare Slider moves?
- Yes. Use the controls next to the preview to change the timing and the motion in real time. Every control is a prop of the component.
- Is it accessible?
- Yes. It uses native elements and ARIA roles, works with the keyboard, follows your shadcn/ui theme tokens, and reduces motion when the system asks for reduced motion.