Skip to content

pastetaste

Type Reveal

TextAnimation

One text-reveal primitive: split a string per word, character or line and bring each piece in from a clip mask, blur, fade, scale or skew, on scroll or on mount.

Paste it into Claude Code: it installs the component, asks for your brand and content, and places it on the page you name.

Install

Or by hand, in a Next.js project with shadcn set up. It writes components/pastetaste/type-reveal.tsx.

npx shadcn@latest add https://pastetaste.com/r/type-reveal.json
Dependenciesmotion@^12.23.0

Prompt

Install the pastetaste component "Type Reveal" (type-reveal) into this Next.js project and use it.

What it is: One text-reveal primitive: split a string per word, character or line and bring each piece in from a clip mask, blur, fade, scale or skew, on scroll or on mount.

Before you place it, ask me (one short message, in my language; "skip" = sensible default): which page and section it goes in, my brand colour (hex), the text, labels or images it should show, and whether I want my logo or my own copy in the demo content. Then:

Steps:
1. If the project has no components.json, run: npx shadcn@latest init -y -d. Then run: npx shadcn@latest add https://pastetaste.com/r/type-reveal.json
   (it writes components/pastetaste/type-reveal.tsx; install any npm packages it reports: motion@^12.23.0).
2. Import it: import { TypeReveal } from "@/components/pastetaste/type-reveal" (check the file for the exact named export).
3. Put it where it fits on the page I name, keep the rest of the page untouched, and pass props for my colours instead of editing the installed file.
4. It does not depend on Tailwind; colours come from CSS variables (--pt-*) or props.
5. It supports prefers-reduced-motion with a still state; do not remove it.

Props (all optional unless the type has no default):
- text: string — The string. With per="line", separate lines with \n.
- per: 'word' | 'char' | 'line' = 'word' — Split granularity.
- preset: 'up' | 'down' | 'blur' | 'fade' | 'scale' | 'skew' = 'up' — Entrance. up, down and skew slide out of a clip mask.
- stagger: number = 0.04 — Seconds between pieces.
- delay: number = 0 — Seconds before the first piece.
- duration: number = 0.8 — Seconds per piece.
- trigger: 'view' | 'mount' = 'view' — When it plays.
- once: boolean = true — Play only the first time it enters the viewport.
- as: ElementType = 'span' — Element to render, e.g. "h1".
- className: string — Class on the root element.
- style: CSSProperties — Inline style on the root element.
- pieceClassName: string — Class on each moving piece.

Live preview: https://pastetaste.com/c/type-reveal
Then run the dev server, check it in the browser at desktop and mobile width, and tell me the page URL.

Props 12

PropTypeDefaultDescription
textstring-The string. With per="line", separate lines with \n.
per'word' | 'char' | 'line''word'Split granularity.
preset'up' | 'down' | 'blur' | 'fade' | 'scale' | 'skew''up'Entrance. up, down and skew slide out of a clip mask.
staggernumber0.04Seconds between pieces.
delaynumber0Seconds before the first piece.
durationnumber0.8Seconds per piece.
trigger'view' | 'mount''view'When it plays.
oncebooleantruePlay only the first time it enters the viewport.
asElementType'span'Element to render, e.g. "h1".
classNamestring-Class on the root element.
styleCSSProperties-Inline style on the root element.
pieceClassNamestring-Class on each moving piece.
View all →