---
title: "Text Running Stitch"
description: "A line of stitches runs along the edges of each letter, sewn one stitch after another."
url: https://gelatinui.com/components/text-running-stitch
markdown_url: https://gelatinui.com/components/text-running-stitch.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/text-running-stitch"
version: "2026-11-15"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text Running Stitch

> A line of stitches runs along the edges of each letter, sewn one stitch after another.

Page: https://gelatinui.com/components/text-running-stitch

## When to use it

Best for: One short, large line of display text that should look sewn on fabric.

- Use it on display text, 28px and up: below that the threads are too fine to read as thread.
- Pass `fontUrl`: a TTF, OTF, or WOFF file of the face the text shows. WOFF2 files cannot be read.
- Use `animated={false}` to show the finished embroidery at once.

## When not to use it

- For the same effect with another look, use [Text Satin Stitch](https://gelatinui.com/components/text-satin-stitch.md).
- For letters that drip like wet ink, use [Text Liquid](https://gelatinui.com/components/text-liquid.md).

## Notes for agents

- Running Stitch Text is Embroidery Text with `stitch="running"` fixed: it takes every other Embroidery Text prop and part.
- `children` is a string, or the parts `TextEmbroideryContent` and `TextEmbroideryCanvas`. Leave out the canvas part for plain text.
- The outlines come from the font file with opentype.js, loaded on demand. Without a file, with WOFF2, or with a file of another face, the text stays plain.
- The real text stays in the page: wrap and the accessible name do not change, but it is not selectable (the canvas draws the letters). The canvas is `aria-hidden`.
- The thread is the text color. Set it with a text color class.

## Anatomy

```text
TextRunningStitch
```

## API reference

### TextRunningStitch

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  | A string, or the parts `TextEmbroideryContent` and `TextEmbroideryCanvas`. |
| `locale` | `string` |  | The BCP 47 locale of the text, for the case of `text-transform` on the canvas. Default: the `DisplayLocaleProvider` locale, else `"en-US"`. |
| `fontUrl` | `string` |  | A TTF, OTF, or WOFF file of the face the text shows (WOFF2 cannot be read). With none, or a file of another face, the text stays plain. |
| `trigger` | `ViewEntryTrigger` |  | When it sews: `view` (default) the first time it shows, or `mount`. |
| `animated` | `boolean` |  | False shows the finished embroidery at once, with no sewing. Default true. |
| `onStitched` | `function` |  | Called when the last thread is sewn (or at once, when the text stays plain). |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextRunningStitch | `text-running-stitch` |  |  |  |

## Usage

Wrap the headline and pass the font file of its face.

```tsx title="hero.tsx"
import {
  TextRunningStitch,
  TextRunningStitchCanvas,
  TextRunningStitchContent,
} from "@/components/pro/text/text-running-stitch";

export function Hero() {
  return (
    <section className="flex flex-col items-center gap-4 py-24 text-center">
      <h1 className="text-7xl font-bold tracking-tight text-blue-900">
        <TextRunningStitch fontUrl="/fonts/hanken-grotesk-700.woff">
          <TextRunningStitchContent>Made slowly</TextRunningStitchContent>
          <TextRunningStitchCanvas />
        </TextRunningStitch>
      </h1>
      <p className="text-muted-foreground">Aprons and table linen, sewn in our studio.</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-running-stitch
```

It adds 34 registry items: 34 files, 4723 lines, and the npm packages `@mantine/hooks`, `@xstate/react`, `clsx`, `motion`, `opentype.js`, `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 Satin Stitch](https://gelatinui.com/components/text-satin-stitch.md)
- [Text Cross Stitch](https://gelatinui.com/components/text-cross-stitch.md)
- [Text Liquid](https://gelatinui.com/components/text-liquid.md)

## Motion

| Part | Motion |
| --- | --- |
| Sew | draw · Each glyph sews in 0.9s on the panel curve · glyphs start 60ms apart · 2.4s at most for the whole text |
