Press-and-hold comparison: holding the frame or the button cross-fades the earlier photograph in and swaps the corner label and caption, releasing returns to the current one.
The simplest comparison there is: press and hold to put the old state back, let go and the current one returns. The picture, the pill label, the button and the caption all follow the hold.
Upgrade to Pro
Pro blocks install through the shadcn CLI with your license key and ship their full source. Docs and live previews stay open to everyone, so you can read every block's details first.
Swap YOUR_EMAIL and YOUR_KEY for the email and license key on your account. Find your license key on your account page.
Radix flavor
npx shadcn add "https://ui.beste.co/r/reveal13?email=YOUR_EMAIL&license_key=YOUR_KEY"Base UI flavor
npx shadcn add "https://ui.beste.co/r-base/reveal13?email=YOUR_EMAIL&license_key=YOUR_KEY"This installs the block to components/beste/block/reveal13.tsx plus the badge7 eyebrow it uses.
The installed file exports reveal13Demo alongside the block: the exact props behind the preview above. Spread it to get a working comparison in one line.
import { Reveal13, reveal13Demo } from "@/components/beste/block/reveal13";
export default function Page() {
return <Reveal13 {...reveal13Demo} />;
}Then replace the demo with your own props. Written out, a trimmed setup looks like this:
import { Reveal13 } from "@/components/beste/block/reveal13";
export default function Page() {
return (
<Reveal13
badge={{ label: "Hold to see" }}
heading="Press and hold to put the old control panel back."
description="Let go and the current one returns."
resting={{
src: "/hardware/now.jpg",
alt: "Minimal control surface",
label: "Now",
description: "One dial, one indicator and nothing else on the face.",
}}
held={{
src: "/hardware/before.jpg",
alt: "Audio hardware on a bench",
label: "Before",
description: "Four buttons, two switches and an unreadable legend.",
}}
changes={[
{ title: "Controls removed", value: "Five" },
{ title: "Setup support tickets", value: "Halved" },
]}
labels={{
holdLabel: "Hold to see the old panel",
holdingLabel: "Release to come back",
hint: "Works with a mouse, a finger, or the space bar.",
}}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
badge | { label: string } | – | Eyebrow label rendered as a Badge7 |
heading | string | – | Section heading in the left header column |
description | string | – | Supporting paragraph in the right header column |
resting | CompareImage | – | The state shown when nothing is held |
held | CompareImage | – | The state shown while the press is held |
changes | CompareChange[] | [] | Ruled facts under the comparison |
labels | Reveal13Labels | {} | Fixed strings that are not content: the two button states and the hint line |
className | string | – | Extra classes for the outer <section> |
type CompareImage = {
src: string;
alt: string;
label: string;
description: string;
};
type CompareChange = {
title: string;
value: string;
};
type Reveal13Labels = {
holdLabel?: string;
holdingLabel?: string;
hint?: string;
};transition-opacity duration-300, so the swap never flashes an empty frame while a file loads.onPointerLeave and onPointerCancel, so a pointer that slides off the frame mid-press cannot leave the block stuck in the held state.keydown and releases on keyup, which is why the control carries aria-pressed rather than pretending to be a toggle.touch-none is set on the frame, so a press and hold on a phone compares rather than scrolls or opens a context menu.aspect-[16/10] becoming md:aspect-[2/1]), keeping the pair cinematic on desktop without a letterbox strip on a phone.reveal6
Before and after comparison where a pointer-driven handle clips the earlier photograph over the later one, with pill labels on both corners and a ruled row of outcome figures beneath.
reveal7
Two versions of the same object compared through a segmented pill control: the photographs cross-fade in place while the title, explanation and ruled note list swap beside them.
reveal12
Two photographs split across the same grid so each square can be flipped from before to after on click, with buttons to turn the whole frame over and a counter of how much has been revealed.
reveal9
Before and after comparison seen through a draggable circular lens: the earlier photograph fills the frame while the later one shows only inside the circle, which follows the pointer or the arrow keys.