Slice Reveal Title
A bar slices across each line and pulls away, leaving the words in its wake, one line after another. You choose the line breaks so the reveal follows the meaning of the sentence, and any line can take the accent colour.
Ready for AI tools one file typed props installs by name prompt included
The decision inside it
The words appear in the bar's wake
Each word is uncovered exactly as the bar's trailing edge passes, never faded in underneath or flashed before it, so it reads as one clean cut. The whole title is a single heading to a screen reader. Reduced motion shows it whole.
Installation
How you get it
Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.
Use Layro's Slice Reveal Title for this.
Install it: npx shadcn@latest add @layro/slice-reveal-title
(the @layro registry is set up in components.json, with LAYRO_KEY in .env.local)
Import it from @/components/ui/slice-reveal-title.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Free components install through the @layro registry with your CLI token: see the Namespaced tab.
When to use it
Use Slice Reveal Title for a short, bold statement cut in line by line, like a film title. You choose the line breaks; mark a line as accent to set it apart.
Usage
import { SliceRevealTitle } from "@/components/ui/slice-reveal-title";
export function Statement() {
return (
<SliceRevealTitle
lines={["Small team.", "Big releases.", "Every Friday."]}
accent={[1]}
className="text-7xl font-bold tracking-tight"
/>
);
}API
“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.
Props
Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.
| Prop | Type | Notes |
|---|---|---|
linesrequired | string[] | The title, one string per line. |
as | Tag | The element to render. Default `h2`. |
barClassName | string | Colour class for the bar, read as `bg-*`. Default the text colour. |
stagger | number | Seconds between lines. Default 0.14. |
trigger | "view" | "mount" | Start when it scrolls into view, or on mount. Default `view`. |
accent | number[] | Lines to mark in the accent colour, by index. |
accentClassName | string | Classes for an accent line's text. Default blue. |
accentBarClassName | string | Classes for an accent line's bar. Default blue. |
Dependencies
npm packages
clsxframer-motiontailwind-mergeLayro foundations, installed alongside it
layro-themeLifetime access
Every component, and everything we ship next.
- All 132 components, source included
- Every template, and everything released after you buy
- shadcn CLI or download — React 18/19, Tailwind v4
- One payment. No subscription.
More in Creative
All Creative componentsPrism Card
FreeTilts toward the pointer and bends a band of spectrum across its face.
Magnet Cluster
FreeA grid of tiles that lean toward the pointer and settle back.
Stack Shuffle
FreeA deck of cards that deals itself as you scroll.
Horizon Pin
FreeA section that pins and turns downward scrolling into a sideways journey.
Morph Tabs
FreeTabs whose indicator flows between options like a drop of liquid.
Expand Gallery
FreeGrid tiles that open in place into a full view, and shrink back.