Segmented State ComparePRO

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.

Reveal7: Segmented State Compare

Two states of the same thing, switched with a segmented control in the header. The photograph cross-fades while the statement, paragraph and ruled notes beside it swap to match.

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.

Upgrade Now

Installation

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

bash
npx shadcn add "https://ui.beste.co/r/reveal7?email=YOUR_EMAIL&license_key=YOUR_KEY"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/reveal7?email=YOUR_EMAIL&license_key=YOUR_KEY"

This installs the block to components/beste/block/reveal7.tsx plus the badge7 eyebrow it uses.

Quick start

The installed file exports reveal7Demo alongside the block: the exact props behind the preview above. Spread it to get a working comparison in one line.

tsx
import { Reveal7, reveal7Demo } from "@/components/beste/block/reveal7";

export default function Page() {
  return <Reveal7 {...reveal7Demo} />;
}

Then replace the demo with your own props. Written out, a trimmed setup looks like this:

tsx
import { Reveal7 } from "@/components/beste/block/reveal7";

export default function Page() {
  return (
    <Reveal7
      badge={{ label: "Switch it" }}
      heading="The old bag and the one that replaced it."
      states={[
        {
          label: "2019 packaging",
          title: "Illustrated, crowded, unreadable at arm's length",
          description: "Six colours, a hand-drawn scene and four typefaces.",
          src: "/packaging/old.jpg",
          alt: "Unbranded paper packaging",
          notes: ["Six-colour print run", "Origin buried on the reverse"],
        },
        {
          label: "Current packaging",
          title: "One colour, one voice and the origin on the front",
          description: "Uncoated stock, a single ink and the name doing the work.",
          src: "/packaging/new.jpg",
          alt: "Minimal coffee packaging",
          notes: ["Single-colour print run", "Origin and roast date on the face"],
        },
      ]}
    />
  );
}

Props

PropTypeDefaultDescription
badge{ label: string }Eyebrow label rendered as a Badge7
headingstringSection heading in the header row
statesCompareState[][]The states being compared, one segment each
classNamestringExtra classes for the outer <section>
ts
type CompareState = {
  label: string;
  title: string;
  description: string;
  src: string;
  alt: string;
  notes: string[];
};

Behavior notes

More Reveal blocks

View all Reveal
PRO

reveal13

Hold To Compare

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.

PRO

reveal6

Drag Compare Slider

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.

PRO

reveal12

Tile Flip Compare

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.

PRO

reveal8

Vertical Split Compare

Comparison that splits horizontally instead of down the middle: a draggable divider wipes the upper photograph away to expose the lower one, with pill labels and a caption for each state.

PRO

reveal10

Self Sweeping Compare

Before and after comparison that plays itself: the seam walks from edge to edge on a timer, clicking the picture freezes it at that point, and a single round control resumes or holds the sweep between the two captions.

PRO

reveal11

Diagonal Peel Compare

Comparison that lifts diagonally instead of wiping straight: dragging the corner handle shrinks a triangular clip on the covering photograph to expose the one underneath, with notes on what changed.

Markdown version