Compare
Before / after slider
Two images of the same frame — a retouch, a restoration, a colour grade — with a divider to drag between them. For two things side by side that aren't the same frame, lay them out next to each other instead.
Basic
- It is a native range on top: drag anywhere, or focus it and use the arrow keys. The value is how much of
#aftershows, read out as "60% after". orientation="vertical"splits top and bottom. In right-to-left pages the reveal starts from the right, with the range.- Give both images the same size and real
alttext;labelnames the control.
Usage
ts
import { BlessCompare } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
label | string | "Compare" | |
orientation | "horizontal" | "vertical" | "horizontal" | |
modelValue | number | 50 | 0–100, how much of the "after" side is revealed |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: number] |
Slots
| Name | Scope | Description |
|---|---|---|
before | — | |
after | — |