---
title: "Text Block Build"
description: "Pixel blocks fall like a puzzle game and lock together into the shape of the word."
url: https://gelatinui.com/components/text-block-build
markdown_url: https://gelatinui.com/components/text-block-build.md
access: free
install: "npx shadcn@latest add @gelatin-ui/text-block-build"
registry_item: https://gelatinui.com/r/text-block-build.json
version: "2026-11-15"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text Block Build

> Pixel blocks fall like a puzzle game and lock together into the shape of the word.

Page: https://gelatinui.com/components/text-block-build

## When to use it

Best for: A short game title that builds itself from falling blocks.

- Use `trigger="mount"` above the fold, and `view` lower on the page.
- Use `built` to control when the word is built.

## When not to use it

- For a heading made of photo tiles, use [Text Mosaic](https://gelatinui.com/components/text-mosaic.md).
- For letters that fall and pile up, use [Text Falling](https://gelatinui.com/components/text-falling.md).

## Notes for agents

- Write the text in the Content part and put the Canvas part after it.
- `onSettled` runs when the last block locks.

## Anatomy

```text
TextBlockBuild
├─ TextBlockBuildContent (0..n)
└─ TextBlockBuildCanvas (0..n)
```

## API reference

### TextBlockBuild

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  | A string, or the parts `TextBlockBuildContent` and `TextBlockBuildCanvas`. |
| `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"`. |
| `trigger` | `"hover" \| "mount" \| "view"` | "view" | When the blocks drop: `view` (default) once, the first time it shows; `mount` once, at once; `hover` each time a pointer comes over it or keyboard focus comes to it (or the link around it); a hover that leaves mid-build takes the blocks back up. |
| `built` | `boolean` |  | True builds the word again, false takes a build back, on top of the trigger. |
| `onSettled` | `function` |  | Called when the blocks have faded into the crisp text, or a build was taken back. |

### TextBlockBuildContent

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### TextBlockBuildCanvas

No props of its own: `className`, `children`, and every other prop go to the element it renders.

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextBlockBuild | `text-block-build` |  |  |  |
| TextBlockBuildContent | `text-block-build-content` | `data-covered` |  |  |
| TextBlockBuildCanvas | `text-block-build-canvas` |  |  |  |

## Usage

Put the word in the Content part and the Canvas after it.

```tsx title="game-title.tsx"
import { TextBlockBuild, TextBlockBuildCanvas, TextBlockBuildContent } from "@/components/text/text-block-build";

export function GameTitle() {
  return (
    <section className="flex flex-col items-center gap-4 py-16 text-center">
      <h1 className="text-8xl font-black tracking-tight">
        <TextBlockBuild trigger="mount">
          <TextBlockBuildContent>Level up</TextBlockBuildContent>
          <TextBlockBuildCanvas />
        </TextBlockBuild>
      </h1>
      <p className="text-muted-foreground">The heading stays real text for search and copy.</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/text-block-build
```

It adds 34 registry items: 34 files, 4512 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 Mosaic](https://gelatinui.com/components/text-mosaic.md)
- [Text Falling](https://gelatinui.com/components/text-falling.md)
- [Text Particle](https://gelatinui.com/components/text-particle.md)
