---
title: "Text Outline Depth Title"
description: "As the page scrolls, an outline copy slides out from behind the title, and joins it again at mid view."
url: https://gelatinui.com/components/text-outline-depth-title
markdown_url: https://gelatinui.com/components/text-outline-depth-title.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/text-outline-depth-title"
version: "2026-11-15"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text Outline Depth Title

> As the page scrolls, an outline copy slides out from behind the title, and joins it again at mid view.

Page: https://gelatinui.com/components/text-outline-depth-title

## When to use it

Best for: One big title of one or two lines in a hero or at the start of a section.

- Wrap the text of a heading. Every element is a `span`, so it is valid in an `h1` or `h2`. Size the text on the heading.
- Use `spread` (in px, default 48) to set how far the copies part at the edges of the pass. At the middle of the view the title is whole.
- Use `container` when the title scrolls inside a box and not with the page, and `disabled` to keep every copy under the face.

## When not to use it

- For the same effect with another look, use [Text Soft Depth Title](https://gelatinui.com/components/text-soft-depth-title.md).
- For a heading whose words slide together into one line, use [Text Split Headline](https://gelatinui.com/components/text-split-headline.md).
- For images and layers that move at their own speed as the page scrolls, use [Parallax](https://gelatinui.com/components/parallax.md).
- For body text or a long paragraph that people must read, use plain text.

## Notes for agents

- Outline Depth Title is Depth Title with `back="outline"` fixed: it takes every other Depth Title prop and part.
- `children` must be a string. The face is the real text: it selects, copies, and a screen reader reads it once. The outline and soft copies are `aria-hidden` and do not select.
- The three layers share one grid cell, so the title takes the size of one line of text. Each layer moves on `translate` only: the copies lag (they look far), the face runs a little ahead.
- React does not render while the page scrolls. Off screen the layers hold still.
- A `spread` that is not a number rests the layers. A word wider than the line breaks, so it does not scroll a phone page sideways.
- The copies fade with `opacity`, so an emoji in the text fades with them.

## Anatomy

```text
TextOutlineDepthTitle
```

## API reference

### TextOutlineDepthTitle

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `string` |  | The title text. Short: one line or two. |
| `spread` | `number` |  | How far the copies part from the face at the edges of the pass, in px. Default 48. At the middle of the view every copy sits under the face. |
| `container` | `RefObject<HTMLElement \| null>` |  | The scroll box, when the title scrolls inside one and not with the page. |
| `disabled` | `boolean` |  | Keeps every copy under the face and stops the scroll work. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextOutlineDepthTitle | `text-outline-depth-title` |  |  |  |

## Usage

Wrap the title of a hero. Size the text on the heading.

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

```bash
npx shadcn@latest add @gelatin-ui-pro/text-outline-depth-title @gelatin-ui/badge @gelatin-ui/button
```

```tsx title="launch-hero.tsx"
import { TextOutlineDepthTitle } from "@/components/pro/text/text-outline-depth-title";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";

export function LaunchHero() {
  return (
    <section className="flex flex-col items-center gap-6 px-4 py-32 text-center">
      <Badge variant="secondary">Version 4.0</Badge>
      <h1 className="text-7xl font-semibold tracking-tight max-sm:text-5xl">
        <TextOutlineDepthTitle spread={48}>
          Built for depth
        </TextOutlineDepthTitle>
      </h1>
      <p className="max-w-md text-muted-foreground">
        Components, blocks, and effects that feel as good as they look.
      </p>
      <div className="flex gap-3">
        <Button>Get started</Button>
        <Button variant="outline">See the components</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-outline-depth-title
```

It adds 22 registry items: 21 files, 3450 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `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 Soft Depth Title](https://gelatinui.com/components/text-soft-depth-title.md)
- [Text Layered Depth Title](https://gelatinui.com/components/text-layered-depth-title.md)
- [Parallax](https://gelatinui.com/components/parallax.md)
- [Parallax Image](https://gelatinui.com/components/parallax-image.md)
- [Text Split Headline](https://gelatinui.com/components/text-split-headline.md)
- [Text Scroll Marquee](https://gelatinui.com/components/text-scroll-marquee.md)

## Motion

| Part | Motion |
| --- | --- |
| Scroll depth | none · the copies part above and below the face as the page scrolls, in the same frame as the scroll, with no easing; whole at the middle of the view |
