Component packs › Lenticular › Lenticular Compare

Lenticular Compare

Tilt the panel and last year's chart turns into this year's strip by strip, so you see exactly which bars moved.

Lenticular Compare is a before and after from Lenticular, a component pack with 6 lenticular controls: Cards, buttons and headings printed like lenticular plastic: tilt and the picture changes strip by strip. Price: $2 for the whole pack.

Built with: charts drawn from data, drag or tilt slider, strip sweep compare.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Lenticular Compare props

PropTypeDefaultDescription
firststringa bar chart of `before`First picture (HTML). Default: a bar chart of `before`.
secondstringa bar chart of `after`Second picture (HTML). Default: a bar chart of `after`.
beforenumber[]charts, one value per monthData for the default charts, one value per month.
afternumber[]
names[string, string]"2025", "2026"Names of the two pictures. Default "2025", "2026".
titlestring"Sign-ups per month"What the numbers are. Default "Sign-ups per month".
widthnumber340Width in px. Default 340.
darkboolean
autoplaynumber | falseShowcase mode: sways between the two (any number turns it on).

Methods on the ref

Use it in React

import LenticularCompare from './LenticularCompare';

<LenticularCompare />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Lenticular

Good for: Skeuomorphic UI.