---
title: "Text Elastic Letters"
description: "Grab a letter and drag it: its neighbors follow like a chain of springs, and all of them spring home on release."
url: https://gelatinui.com/components/text-elastic-letters
markdown_url: https://gelatinui.com/components/text-elastic-letters.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/text-elastic-letters"
version: "2026-11-15"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text Elastic Letters

> Grab a letter and drag it: its neighbors follow like a chain of springs, and all of them spring home on release.

Page: https://gelatinui.com/components/text-elastic-letters

## When to use it

Best for: One short word or heading that people can grab, stretch, and drop.

- Put it inside a heading or a paragraph as the text itself.
- Use it on one word or a short heading, not on body copy.

## When not to use it

- For letters that fall and pile up with physics, use [Text Falling](https://gelatinui.com/components/text-falling.md).

## Notes for agents

- `children` must be a string. A text over 40 letters, and Arabic and other joined scripts, move by word.
- The root is one tab stop. Left and Right pick a letter, Up and Down (Shift with Left and Right) pull it, and the key release springs it home.
- A drag stretches a letter at most 48px with a rubber pull. Each neighbor follows 0.62 of the one next to it.
- Off screen or `paused`, the letters rest, take no drag, and leave the Tab order.

## Anatomy

```text
TextElasticLetters
```

## API reference

### TextElasticLetters

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `locale` | `string` |  | The BCP 47 locale for the letter and word split (`Intl.Segmenter`). Default: the `DisplayLocaleProvider` locale, else `"en-US"`. |
| `children` | `string` |  | The text. Each letter can be grabbed; a script that joins its letters moves by word. |
| `paused` | `boolean` |  | Stops the effect (controlled): the letters go home and take no drag. |
| `defaultPaused` | `boolean` |  | The first pause when `paused` is not given. Default false. |
| `onPausedChange` | `function` |  | Called when the pause changes. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextElasticLetters | `text-elastic-letters` |  |  |  |

## Usage

Put it inside a heading around the word people can stretch.

The sample also uses `button`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui-pro/text-elastic-letters @gelatin-ui/button
```

```tsx title="landing-hero.tsx"
import { TextElasticLetters } from "@/components/pro/text/text-elastic-letters";
import { Button } from "@/components/ui/button";

export function LandingHero() {
  return (
    <section className="flex flex-col gap-4 py-20">
      <h1 className="text-6xl font-semibold tracking-tighter">
        Interfaces that <TextElasticLetters>feel</TextElasticLetters>
      </h1>
      <p className="max-w-lg text-lg text-muted-foreground">
        Copy React components into your app with the shadcn CLI.
      </p>
      <div className="flex gap-3">
        <Button size="lg">Browse components</Button>
        <Button size="lg" variant="outline">
          Read the docs
        </Button>
      </div>
    </section>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/text-elastic-letters
```

It adds 21 registry items: 21 files, 3078 lines, and the npm packages `@mantine/hooks`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `xstate`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Text Falling](https://gelatinui.com/components/text-falling.md)
- [Magnetic](https://gelatinui.com/components/magnetic.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves the focus to the text. |
| Left / Right | Picks the letter to pull. A line under it shows which one. |
| Up / Down, Shift + Left / Right | Pulls the letter 10px per press. The release of the key springs it home. |

## Motion

| Part | Motion |
| --- | --- |
| Drag | follow · spring · 234ms · each letter follows its neighbor toward the held letter |
| Release | sway · spring · 325ms · bounce 0.6 · every letter springs home, about 8px per frame at most |
| Hover | hover · a mouse pulls the letters near it up to 4px |
