Skip to content

1 variant

Image Compare

A before and after pair split by a divider you drag, built on a real range input so the keyboard works for free.

The photograph with all colour removedThe same photograph with its colour restoredOriginalGraded

Install

$ bunx --bun shadcn add @easeui-pro/image-compare

Props

beforeSrcRequiredstring

The image on the left of the divider.

beforeAltRequiredstring

Both images are real content, so neither gets an empty alt.

afterSrcRequiredstring

The image on the right of the divider.

afterAltRequiredstring

Describe what changed, not just the subject.

beforeLabelstringDefault "Before"

Corner pill on the left.

afterLabelstringDefault "After"

Corner pill on the right.

aspectstringDefault "4 / 3"

Reserved up front, so nothing on the page moves as the images load.

defaultValuenumberDefault 50

Where the split starts, 0 to 100.

classNamestring

Merged last, so anything passed here wins over the component's own classes.