Skip to content
Textlab
1
Browse

ComponentsCursor

Tilt text

Extruded type tilts toward the pointer.

Depth

Installation

$ npx shadcn@latest add @textlab/tilt-text

Needs @textlab in your components.json. Setup takes a minute.

Usage

usage.tsx
import { TiltText } from "@/components/textlab/tilt-text/tilt-text";

<TiltText as="h1" text="Depth" />

Variants

extrudefloatshadow

Props

PropTypeDefaultDescription
text*string–The copy.
variant"extrude" | "float" | "shadow""extrude"Solid depth, floating above a ground shadow, or a long pointer-driven shadow.
tiltnumber18Largest tilt in degrees.
depthnumber12Extrusion layers.
sideColorstringa darker mix of the text colorColor of the extruded sides.
asElementType"span"Rendered element.
reducedMotion"user" | "always" | "never""user"user follows the OS setting; always shows the still version.
classNamestring–Merged onto the root.

When to use it

Reach for it

  • Bold single words in hero sections.
  • Product names and numbers with a physical feel.

Skip it

  • Long or wrapping text.
  • Dense layouts; the tilt needs breathing room.

Accessibility and motion

Accessibility

  • Depth layers are aria-hidden copies; the word is read once.
  • At rest the text faces forward and reads normally.

Motion

  • The tilt eases toward the pointer and back to center when it leaves.
Reduced motion. Still, front-facing text with its depth intact.

Performance

  • Transforms on one 3D group; layers are static inside it.