Skip to content

Text Perspective

Pro

Lines of text sit at different depths on a 3D plane that tilts with the scroll or the mouse and goes flat mid view.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 14, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Text Perspective needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
21
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Wrap a statement between two sections. Put a line break between the lines.

The sample also uses Button. One command adds them with this item:

speed-section.tsx

TextPerspective

<span>
PropTypeDefaultDescription
localestring—The BCP 47 locale for the letter and word split (Intl.Segmenter). Default: the DisplayLocaleProvider locale, else "en-US".
childrenRequiredstring—The text. With by line, a line break (\n) starts a new line.
by"line""word""line"The pieces that stand at different depths: line (default) or word.
driver"pointer""scroll""still""scroll"What turns the plane: scroll (default) the scroll place of the text, pointer the mouse on the text, still nothing (a fixed pose).
anglenumber20The largest turn of the plane in degrees. Default 20.
depthnumber0.6The depth step from one piece to the next, in em of the text. Default 0.6.
perspectivenumber900The 3D view distance in px. Smaller is stronger. Default 900.
settlebooleantrueWith driver scroll: the pieces come together into a flat text at the middle of the scroll range, and spread in depth before and after it. Default true. Off, they keep their depth.
offsetParallaxOffsetPARALLAX_FULL_PASSWith driver scroll: the scroll range, in Motion's offset words. Default ["start end", "end start"]: from the moment the text enters at the bottom to the moment it leaves at the top. The text is flat at the middle.
containerRefObject<HTMLElement | null>—With driver scroll: the scroll box, when the text scrolls inside one.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.
  • Wrap the text of a heading. Every element is a span, so it is valid in an h1 or h2.
  • Use by="line" (default) and put a line break (\n) between the lines, or by="word" to give each word its own depth.
  • Use driver="scroll" (default) to turn the plane with the scroll place, pointer to turn it away from the mouse, or still for a fixed pose.
  • Use angle (default 20), depth (in em, default 0.6), and perspective (default 900px) to tune the look.
  • Use settle={false} to keep the depth while it scrolls, offset to change the scroll range, and container when the text scrolls inside a box.
  • For a title folded like paper that unfolds as it scrolls in, use Text Fold.
  • For a card or an image that turns toward the mouse, use Tilt.
  • For layers that move at their own speed as the page scrolls, use Parallax.
  • For body text or a long paragraph that people must read, use plain text.
TabWith driver="pointer": while keyboard focus is on the link or button around the text, the plane turns as the mouse at the right edge would turn it.
Scroll turn
none · the plane turns and the pieces spread in depth as the page scrolls, in the same frame as the scroll, with no easing; flat at the middle of the range
Mouse turn
hover · 150ms · the plane turns away from the mouse, up to `angle` degrees
Keyboard lean
panel · 260ms · keyboard focus around the text turns the plane to the side
  1. AddedText Perspective.
Open the release