Back to Components
Components

Image Comparison

Before and after image comparison with a draggable slider handle.

BeforeAfter
After image

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/image-comparison.tsx

Installation

Using shadcn CLI

npx shadcn add image-comparison --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge