---
title: "Text Typesetter"
description: "Each letter drops in as a metal type piece, a press stamps it, and the ink spreads a little into the paper."
url: https://gelatinui.com/components/text-typesetter
markdown_url: https://gelatinui.com/components/text-typesetter.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/text-typesetter"
version: "2026-11-15"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text Typesetter

> Each letter drops in as a metal type piece, a press stamps it, and the ink spreads a little into the paper.

Page: https://gelatinui.com/components/text-typesetter

## When to use it

Best for: A heading where each letter drops in as metal type and a press stamps it.

- Use `trigger="mount"` above the fold.
- Keep it to a short line: each letter is one piece.

## When not to use it

- For text pressed into paper, use [Text Letterpress](https://gelatinui.com/components/text-letterpress.md).
- For text that types in with a caret, use [Text Typewriter](https://gelatinui.com/components/text-typewriter.md).

## Notes for agents

- `children` must be a string.
- `onSettled` runs when the last letter is stamped.

## Anatomy

```text
TextTypesetter
```

## API reference

### TextTypesetter

| 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. Up to 40 letters each get a type piece; a longer text is set by words. |
| `trigger` | `ViewEntryTrigger` | "view" | When it prints: `view` (default) the first time it shows, or `mount` at once. |
| `onSettled` | `function` |  | Called when the last piece lifts and the text is plain. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextTypesetter | `text-typesetter` |  |  |  |

## Usage

Wrap a short heading.

```tsx title="press-heading.tsx"
import { TextTypesetter } from "@/components/pro/text/text-typesetter";

export function PressHeading() {
  return (
    <section className="flex flex-col items-center gap-4 py-16 text-center">
      <h1 className="text-6xl font-semibold tracking-tight">
        <TextTypesetter>Set in metal</TextTypesetter>
      </h1>
      <p className="text-muted-foreground">Real text inside, so people can still select and copy it.</p>
    </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-typesetter
```

It adds 12 registry items: 12 files, 1748 lines, and the npm packages `clsx`, `motion`, `tailwind-merge`.

## 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 Letterpress](https://gelatinui.com/components/text-letterpress.md)
- [Text Typewriter](https://gelatinui.com/components/text-typewriter.md)
- [Text Split Headline](https://gelatinui.com/components/text-split-headline.md)
