Xzero UI
Pro library

Sand textPro

A headline made of sand that pours into the letters, crumbles where the cursor digs, and heals itself.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/sand-text
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-pro/sand-text

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 { SandText } from "@/components/xzero/sand-text/sand-text";

export function Hero() {
  return <SandText as="h1" text="Dunes" />;
}

API reference

SandText

A headline made of sand. Grains pour in and pack into the letters, the pointer digs through them and throws grains that tumble and pile, and at rest the letters heal while the extra sand drifts away. Changing the text collapses the old word into sand.

PropTypeDefaultDescription
text (required)string–The text to form. Keep it to one short line. Changing it collapses the old word and pours the new one.
grainnumber2Grain size in CSS px.
radiusnumber14Radius the pointer digs through, in CSS px.
palettestring[]–Grain colors. Each grain picks one and varies it slightly. Defaults to the text color.
as"h1" | "h2" | "h3" | "p""h2"Element for the visually hidden text.
classNamestring–Extra class on the root. Set font-size here to size the letters.
styleCSSProperties–Inline styles on the root.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in type

Guidance for AI tools

Sand text: A headline made of sand that pours into the letters, crumbles where the cursor digs, and heals itself. 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