Blocks
Tab Wipe
A centered screenshot stage that wipes between slides while a thumbnail strip picks the shot.
A centered hero stage. Slides wipe over each other on a clip-path edge
while the incoming shot settles out of a slight scale and drift, so the change
reads as one movement rather than a crossfade. The thumbnail strip below is a
real tablist — click a shot to jump to it, and the stage autoplays again
between clicks. GSAP + CustomEase.
Installation
pnpm dlx shadcn@latest add @tween-ui/tab-wipeUsage
import TabWipe from '@/components/tweenui/tab-wipe';
export default function Page() {
return <TabWipe />;
}Pass your own screens:
import TabWipe from '@/components/tweenui/tab-wipe';
export default function Page() {
return (
<TabWipe
slides={[
{ image: '/shots/board.png', alt: 'Workflow board' },
{
image: '/shots/reports.png',
alt: 'Performance dashboard',
tabImage: '/shots/reports-thumb.png',
},
{ image: '/shots/team.png', alt: 'Team planning' },
]}
/>
);
}Drop your own copy above it — the stage brings no heading of its own:
<section className="space-y-10 text-center">
<h1 className="text-5xl font-medium">Manage everything. Grow faster.</h1>
<TabWipe className="py-0" />
</section>Props
| Prop | Type | Default | Description |
|---|---|---|---|
slides | TabWipeSlide[] | three shots | Stage slides; the tab strip mirrors these. |
Extends native <section> attributes (className, style, …).
TabWipeSlide
| Field | Type | Description |
|---|---|---|
image | string | Full-bleed image for the stage. |
alt | string | Alt text, also the slide key and the tab's label. |
tabImage | string | Thumbnail for the strip. Falls back to image. |
The stage keeps a 16/10 aspect ratio inside a 720px column, so it scales
with the page rather than holding a fixed height. Two slides is the practical
minimum — with one, the tab strip has nothing to switch to.
Accessibility
The strip is a real tablist: each thumbnail is a tab labelled with its
slide's alt, and aria-selected tracks the visible shot. Autoplay stops the
moment you pick a tab and resumes after the transition. Under
prefers-reduced-motion: reduce slides cut over instantly instead of wiping,
and the tab highlight loses its fade.