Xzero UI
Pro library

Text reveal

Reveal a short piece of content with restrained motion.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui/text-reveal
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui/text-reveal

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { TextReveal } from "@/components/xzero/text-reveal/text-reveal";

export function Hero() {
  return <TextReveal as="h1" text={"Ship interfaces\nthat feel precise"} delay={0.1} />;
}

API reference

TextReveal

Reveals a headline once on mount: each word rises out of its own clip while it sharpens from a soft blur. Runs in CSS, so it starts on first paint.

PropTypeDefaultDescription
text (required)string–The copy to reveal. Use \n for a deliberate line break.
as"h1" | "h2" | "h3" | "p""h2"Rendered element. p uses a softer blur.
delaynumber0Seconds before the first word rises.
classNamestring–Merged onto the rendered element.
idstring–Forwarded to the rendered element, e.g. for aria-labelledby.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in text effects

Guidance for AI tools

Text reveal: Reveal a short piece of content with restrained motion. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components