Back to components
ComponentGalleryFree

Dot Image Slider React component

A before/after image reveal, a luminance-mapped halftone dot rendering on one side, the real photo on the other, dragged apart by a glowing lightsaber-style divider handle.

About the Dot Image Slider component

Dot Image Slider is a free before/after reveal for a single photo: one side shows the image redrawn as a halftone of dots sized by brightness, the other the real photo, split by a glowing, lightsaber-style handle you drag across.

The halftone is drawn on a canvas; dot spacing, maximum dot size, dot and background colors and the handle's glow color are props.

When to use it

Use it for a striking hero or portfolio piece: print and design studios, photographers, or anything that plays with the idea of an image being developed or revealed.

To compare two different photos, use Compare Slider.

Installation

Add the Dot Image Slider component to your project with the shadcn CLI. It lands in components/dot-image-slider.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/dot-image-slider

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install clsx tailwind-merge

More Gallery components

Diamond Scroll Gallery
Skew Scroll Gallery
Linen Drag Image
YouTube Gallery
Expand Card Grid
Free
Gallery Reveal