Skip to content

Text Fold

Pro

Text folded into bands like a sheet of paper. It unfolds as it scrolls into view and folds again under the mouse.

  • 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 Fold 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
19
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 the title of a section. It unfolds as the reader scrolls it into view.

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

chapter-section.tsx

TextFold

<span>
PropTypeDefaultDescription
childrenRequiredstring—The text. It folds as one sheet of paper, across all its lines.
slatsnumber4How many bands the sheet folds into, from 2 to 12. Default 4.
anglenumber80The turn of each band when folded, in degrees (90 is edge on). Default 80.
perspectivenumber800The 3D view distance in px. Smaller is stronger. Default 800.
trigger"mount""scroll""view""scroll"What unfolds it: scroll (default) the scroll place of the text, view one unfold the first time it is on screen, mount one unfold at once.
rangereadonly [number, number]DEFAULT_RANGEWith trigger scroll: where the unfold starts and ends, as shares of the view height from its top. Default [1, 0.6]: it starts to open when the top of the text is at the bottom edge of the view, and it is flat when the middle of the text is at 60%. When the page cannot scroll that far (the text is near the end of the page), it is flat at the end of the scroll.
containerRefObject<HTMLElement | null>—With trigger scroll: the scroll box, when the text scrolls inside one.
refoldnumber0How far the sheet folds again while the mouse is on it, or while keyboard focus is on it or on an element around it, from 0 (off, default) to 1 (fully).
...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 trigger="scroll" (default) to tie the unfold to the scroll place, view for one unfold the first time it is on screen, or mount for one unfold at once.
  • Use slats (2 to 12, default 4) for the number of bands, angle (default 80) for the turn of each band, and perspective (default 800px) for the 3D view.
  • Use range to move where the scroll unfold starts and ends in the view, and container when the text scrolls inside a box.
  • Use refold (0 to 1) to fold it again while the mouse is on it, or while keyboard focus is on a link or button around it.
  • For lines of a text at different depths on a plane that turns, use Text Perspective.
  • 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.
TabWhile keyboard focus is on the link or button around the text, it folds again by refold, as the mouse would fold it.
Scroll unfold
none · the bands open as the page scrolls, in the same frame as the scroll, with no easing; a scroll back folds them again
Unfold on view or mount
draw · 900ms · the folded sheet opens flat once
Refold
panel · 260ms · the sheet folds again by `refold` under the mouse or with keyboard focus around it, and opens when they leave
  1. AddedText Fold.
Open the release