Comparison Slider with Highlights

Split-layout image comparison with a sidebar featuring benefit highlights and icons alongside a draggable before/after slider. Perfect for demonstrating product improvements with detailed feature callouts.

FREE

Reveal2: Comparison Slider with Highlights

Split-layout comparison section pairing a benefits sidebar (badge, heading, description, up to six highlight rows) with the same drag-to-reveal before/after slider used in reveal1, embedded in a 12-column grid.

Free block

This block is free. No license or account is required: install it with the CLI and use it in unlimited projects.

Installation

Radix flavor

bash
npx shadcn add "https://ui.beste.co/r/reveal2"

Base UI flavor

bash
npx shadcn add "https://ui.beste.co/r-base/reveal2"

This installs the block to components/beste/block/reveal2.tsx and the badge shadcn/ui primitive it depends on.

Quick start

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

tsx
import { Reveal2, reveal2Demo } from "@/components/beste/block/reveal2";

export default function ShowcasePage() {
  return <Reveal2 {...reveal2Demo} />;
}

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

tsx
import { Check, Zap } from "lucide-react";
import { Reveal2 } from "@/components/beste/block/reveal2";

export default function ShowcasePage() {
  return (
    <Reveal2
      badge={{ label: "Compare", variant: "secondary" }}
      heading="See the difference"
      description="Drag to compare the before and after states."
      highlights={[
        { id: "speed", icon: <Zap className="size-5" />, title: "Faster load times" },
        { id: "quality", icon: <Check className="size-5" />, title: "Sharper output" },
      ]}
      beforeImage={{ src: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=1200&h=800&fit=crop&sat=-100", alt: "Before" }}
      afterImage={{ src: "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?w=1200&h=800&fit=crop", alt: "After" }}
    />
  );
}

Props

PropTypeDefaultDescription
badge{ label: string; variant?: "default" | "secondary" | "outline" }Small badge above the heading
headingstringMain headline
descriptionstringSupporting copy below the heading
highlightsHighlight[][]Benefit rows in the sidebar, capped at six
beforeImage{ src: string; alt: string }Image clipped by the divider
afterImage{ src: string; alt: string }Full-bleed background image
beforeLabelstring"Before"Pill label over beforeImage
afterLabelstring"After"Pill label over afterImage
showLabelsbooleantrueToggles the Before/After pill labels
orientation"horizontal" | "vertical""horizontal"Drag axis and divider orientation
initialPositionnumber50Starting divider position, 0-100
dividerWidthnumber4Divider bar thickness in pixels
classNamestringExtra classes for the outer <section>
ts
type Highlight = {
  id: string;
  icon?: React.ReactNode;
  title: string;
  description?: string;
};

Behavior notes

More Reveal blocks

View all Reveal
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.

PRO

reveal4

Scroll-Reveal Gallery

An editorial scroll-reveal gallery where images fade and rise into view with monospace captions and alternating rhythm.

PRO

reveal3

Manifesto Scroll Reveal

A type-forward manifesto whose ruled statement lines fade and rise into view as the section enters the viewport.

PRO

reveal5

Editorial Statement Reveal

A large light manifesto statement with an accent-highlighted phrase, an eyebrow above, and a supporting footnote plus outline button beneath a hairline rule.