Skip to content

Text Strike Morph

Pro

When the text changes, a line strikes out the old words, they drop away, and the new ones slide in.

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

Added Nov 15, 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 Strike Morph 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
17
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.

Pass the text as children, and every value in reserveWidthFor so the price keeps its width.

plan-price.tsx

TextStrikeMorph

<div>
PropTypeDefaultDescription
localestring—The BCP 47 locale for the letter and word split (Intl.Segmenter). Default: the DisplayLocaleProvider locale, else "en-US".
childrenRequiredstring—The text to show. A new value morphs from the old one.
granularity"grapheme""word"—The size of the moving pieces. Default: grapheme for short text, else word. A script that joins its letters (Arabic) always morphs by word (resolveGranularity in #/lib/split-text).
reserveWidthForreadonly string[]—Every text this morph can show (["Copy link", "Copied"]). The root keeps the width of the widest one, so a price or a badge never changes size between states; only the letters move inside it. Align the text in that width with justify-items-* on the root (start by default). Leave it out for text in a sentence: there the width slides instead.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Pass the text as children; a new value morphs from the old one.
  • Set reserveWidthFor with every value in a fixed slot, such as a price, so its width never changes.
  • Leave reserveWidthFor out in a sentence, so the words after it slide with the width.
  • For the same effect with another look, use Text Blur Morph.
  • For a number that counts up or down digit by digit, use Rolling Number.
  • For a number that counts from one value to another, use Count Up.
Slide
panel · shared pieces slide to their new place, and the width follows
Enter
indicator · new pieces rise 0.25em and fade in from a blur, 30ms apart
Exit
popup · old pieces rise and fade out with a blur
Strike exit
indicator · with `effect="strike"`, a line draws through each old piece, then it drops 0.25em and fades on popup; new pieces slide in from the inline start after the line
  1. AddedText Strike Morph.
Open the release