Component packs › Darkroom › Grade Compare

Grade Compare

Drag the line between the flat photo as shot and the grade you pick; the handle follows on a spring.

Grade Compare is a before and after from Darkroom, a component pack with 7 effects: Seven photo effects that work on real photos, not on drawings of them. Price: $2 for the whole pack.

Built with: spring divider, filter looks, keyboard slider.

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.

Grade Compare props

PropTypeDefaultDescription
lightboolean
autoplayboolean
srcstring
looks[string, string][]Your own looks as CSS filter strings.
onChange(state: { position: number; look: string }) => void

Methods on the ref

Use it in React

import GradeCompare from './GradeCompare';

<GradeCompare />

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

More in Darkroom

Good for: Image effect components.