Split-Flap Hero
A landing hero whose key phrase lives on a mechanical departure board — every character clacks through the alphabet on hinged 3D leaves before landing, with flap counters underneath.
Try it: Watch the board flip; use the arrows or pause button bottom-right.
Brings its own background. Paints its own warm-paper (light) / ink (dark) backdrop via dark: variants; the flap board itself stays charcoal in both. Override the surface with className (bg-*, rounded-*, py-*).
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/split-flap-hero.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/split-flap-hero. You can also copy the source into components/ui/split-flap-hero.tsx (view on GitHub).
Usage
import { SplitFlapHero } from '@/components/ui/split-flap-hero'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
words | string[] | DEFAULT_SPLIT_FLAP_WORDS | Phrases cycled on the board (upper-cased, up to 12 characters). |
prefix | string | 'Interfaces that' | Static headline line above the board. |
description / eyebrow | string | — | Supporting copy and the pill above the headline. |
ctaLabel / onCta | string / () => void | 'Get your ticket' | Primary button. |
secondaryLabel / onSecondary | string / () => void | — | Ghost button; omit label to hide. |
stats | { value, label }[] | — | Small amber flap counters under the CTAs. |
interval | number | 3400 | ms each phrase rests on the board. |
autoPlay | boolean | true | Cycle automatically; pause/next/prev controls are always rendered. |
onWordChange | (word, index) => void | — | Fires when the board lands on a new phrase. |
Dependencies
motionlucide-react
Related Hero components
- Ridgeline Horizon Hero
Headline words rise out of masks above a canvas terrain of stacked ridgelines receding to a sunrise; the pointer raises a swell that rolls back to the horizon and clicks send a ripple.
- Route Chooser Hero
A fork in the road under a sky that follows your attention: hover or focus the left card and the sun climbs, the right one and the moon rises while a lantern walks that branch. Real buttons or links…
- Kinetic Name Hero
Your name set huge, every letter on its own spring — letters are pushed away, tilt and swell as the cursor passes, then ease home; a soft light trails the pointer and a badge circles the role.
- Terminal Dev Hero
A developer intro with a live terminal: commands type with human rhythm, outputs stream in, a build bar fills and the window floats in 3D with the pointer. Pause and replay included.
- Spotlight Reveal Hero
A quiet paper-and-ink hero with a cursor-lit lens that reveals a saturated, grid-drawn “lit” version of the same message; the beam wanders on its own when idle and locks onto the button on keyboard…
- Photo Strip Hero
A big headline over two tilted rails of photo cards drifting in opposite directions — they slow under the pointer, surge with scroll velocity and lift on hover.