Compare 2 - Before/afterPro
Draggable before/after image slider with keyboard support and result stats underneath.
About Compare 2
Draggable before/after image slider with keyboard support and result stats underneath.
Compare 2 is a compare block for React and Tailwind CSS, included in Chocolate UI Pro with motion animations that respect reduced-motion settings. It ships as 130 lines of TypeScript you own: every piece of copy is a prop with a sensible default, so you can drop it in and replace the content without touching the layout.
- slider
- images
- drag
Installation
- Set up your project with
npx chocolateui initandnpx chocolateui login(see the installation guide). - Run the Chocolate UI CLI:
npx chocolateui add compare-02Dependencies installed automatically: lucide-react, motion.
Uses: badge, reveal, utils.
Usage
import Compare02 from "@/components/blocks/compare-02"
export default function Page() {
return <Compare02 />
}