Before / After

A wipe slider for redesigns, retouching and restorations — with an old photo restored by default.

  • Zero dependencies
  • React + Tailwind
  • Accessible
  • Reduced-motion aware
Open in v0

Preview

Animated · Full motion: idle animation, physics and effects. animated (default)

Drag the seam, click anywhere, or use ← →. Takes any two React nodes. A first-visit wiggle hints that it's interactive.

Installation

$ npx shadcn@latest add https://pickui.guetix.com/r/before-after.json

Uses the shadcn CLI. It creates components/pickui/before-after.tsx and installs nothing else.

Usage

example.tsx
import { BeforeAfter } from "@/components/pickui/before-after";

export default function Example() {
  return <BeforeAfter />;
}

Props

PropTypeDefaultDescription
before / afterReactNode—The two layers.
beforeLabel / afterLabelstring—Corner labels.
initialnumber50Start position (0–100).
animatedbooleantruefalse = the calm “Regular” version (no idle or ambient motion).

Accessibility

  • role=slider handle with arrow-key control.