# Beste UI

> Beautiful, accessible blocks, pieces and components for shadcn/ui and Tailwind CSS, built for React and Next.js. Install one with the shadcn CLI and the code is yours to edit: no runtime dependency, nothing to upgrade.

Markdown rendition of https://ui.beste.co/block/reveal10. Every page on the site has one: add `.md` to any address, or send `Accept: text/markdown`.

Last updated: 2026-07-29

Whole catalog for LLMs: https://ui.beste.co/llms.txt. Registry index: https://ui.beste.co/r/registry.json

---
1. /
2. [Blocks](/blocks)
3. /
4. [Reveal](/blocks/reveal)
5. /
6. Self Sweeping Compare

# Self Sweeping Compare[PRO](/pricing)

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.

ViewCodeDocs

Base UI

![](https://oud.pics/sm/l/npm.svg)`npx shadcn add https://ui.beste.co/r-base/reveal10`

## Reveal10: Self Sweeping Compare

A comparison that plays itself: the seam walks from edge to edge and turns around, and clicking anywhere on the picture freezes it exactly where you want to look. One round control between the two captions puts the sweep back on.

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 NowUpgrade Now](/pricing)

### Installation

Swap `YOUR_EMAIL` and `YOUR_KEY` for the email and license key on your account. Find your license key on your [account page](/account).

**Radix flavor**

bashCopy

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

**Base UI flavor**

bashCopy

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

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

### Quick start

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

tsxCopy

```
import { Reveal10, reveal10Demo } from "@/components/beste/block/reveal10";

export default function Page() {
  return <Reveal10 {...reveal10Demo} />;
}
```

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

tsxCopy

```
import { Reveal10 } from "@/components/beste/block/reveal10";

export default function Page() {
  return (
    <Reveal10
      badge={{ label: "Wipe it across" }}
      heading="The shelf redesigns itself while you watch."
      description="The seam sweeps on its own. Click the picture to stop it."
      duration={7}
      before={{
        src: "/packaging/old.jpg",
        alt: "Unbranded paper packaging",
        label: "2019",
        caption: "Six colours, four typefaces, unreadable at arm's length.",
      }}
      after={{
        src: "/packaging/new.jpg",
        alt: "Minimal coffee packaging",
        label: "Today",
        caption: "One ink, uncoated stock, origin on the face of the bag.",
      }}
      labels={{
        playLabel: "Let the seam sweep",
        pauseLabel: "Hold the seam still",
        frameLabel: "Click to stop the sweep",
      }}
    />
  );
}
```

### Props

| 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                      |
| before      | CompareImage      | –       | The image revealed to the left of the seam                           |
| after       | CompareImage      | –       | The image revealed to the right of the seam                          |
| duration    | number            | 7       | Seconds for one full sweep across the frame                          |
| labels      | Reveal10Labels    | {}      | Fixed strings that are not content: the play, pause and frame labels |
| className   | string            | –       | Extra classes for the outer <section>                                |

tsCopy

```
type CompareImage = {
  src: string;
  alt: string;
  label: string;
  caption: string;
};

type Reveal10Labels = {
  playLabel?: string;
  pauseLabel?: string;
  frameLabel?: string;
};
```

### Behavior notes

* The sweep is a 40 millisecond interval whose step is derived from `duration`, and a direction ref flips at each edge, so the seam bounces rather than jumping back to the start.
* The timer never starts when the visitor prefers reduced motion: `matchMedia("(prefers-reduced-motion: reduce)")` is checked before the interval is created, leaving a still comparison that can be clicked.
* The whole frame is one `button` with an `aria-label`, so clicking the picture stops the sweep at the clicked position, and the control is reachable by keyboard as a single target.
* The seam is the only furniture on the picture: a hairline with a small dot at its foot, no track and no thumb parked underneath, which was the point of this variant.
* The reveal is a `clip-path: inset()` on the before layer, so neither photograph is squashed while the visible slice changes.
* The round play control sits between the two captions on a `md:grid-cols-[1fr_auto_1fr]` row, so it reads as the pivot of the comparison rather than a media button under it.
* That control carries `aria-pressed` and swaps its own label between the play and pause strings, so its state is announced rather than only drawn.

## More Reveal blocks

[View all Reveal](/blocks/reveal)

[](/block/reveal6)

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.

[](/block/reveal7)

PRO

reveal7

### Segmented State Compare

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.

[](/block/reveal1)

FREE

reveal1

### Before/After Image Slider

Interactive image comparison component with a draggable divider supporting horizontal and vertical orientations. Perfect for showcasing transformations, photo editing results, or design improvements.

[](/block/reveal12)

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.

[](/block/reveal9)

PRO

reveal9

### Spotlight Lens Compare

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.

[](/block/reveal11)

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.

## Ship the interface, keep the code.

New blocks, pieces and components every week. Install one with a command and it is yours to edit. No runtime dependency, no upgrade path to fight.

[Browse the libraryBrowse the library](/blocks)[See pricingSee pricing](/pricing)

### Library

* [Blocks](/blocks)
* [Pages](/pages)
* [Pieces](/pieces)
* [Components](/components)
* [Search](/search)

### Learn

* [Docs](/docs)
* [AI & MCP](/docs/mcp)
* [Blog](/blog)
* [Free tools](/tools)
* [What's new?](/changelog)
* [Website Builder](https://beste.co)

### More

* [Pricing](/pricing)
* [Referrals](/referrals)
* [License](/license)
* [GitHub](https://github.com/beste-co/beste-ui)

### Shadcn Blocks

* [Shadcn Hero Blocks](/blocks/hero)
* [Shadcn Feature Blocks](/blocks/feature)
* [Shadcn Pricing Blocks](/blocks/pricing)
* [Shadcn CTA Blocks](/blocks/cta)
* [Shadcn FAQ Blocks](/blocks/faq)
* [Shadcn About Blocks](/blocks/about)
* [Shadcn Stats Blocks](/blocks/stats)
* [Shadcn Footer Blocks](/blocks/footer)
* [Shadcn Navigation Blocks](/blocks/navigation)
* [Shadcn Auth Blocks](/blocks/auth)
* [Shadcn Ecommerce Blocks](/blocks/ecommerce)
* [Shadcn Portfolio Blocks](/blocks/portfolio)
* [Shadcn Showcase Blocks](/blocks/showcase)
* [Shadcn Careers Blocks](/blocks/careers)
* [Shadcn Onboarding Blocks](/blocks/onboarding)
* [Shadcn Coming Soon Blocks](/blocks/coming-soon)
* [Shadcn Post Blocks](/blocks/post)
* [Shadcn Legal Blocks](/blocks/legal)
* [Shadcn Workflow Blocks](/blocks/workflow)
* [Shadcn News Blocks](/blocks/news)

© 2026, [Beste](https://beste.co). All rights reserved.