# Fit Title

One-line title that sizes itself to fill the available width, measured with the real font once it has loaded.

```bash
npx shadcn add https://www.reelcn.dev/r/fit-title.json
```

Usage:

```tsx
<Center>
  <FitTitle text="Season finale" effect="mask" />
</Center>
```

Use for:

- Big one-word or short titles that should fill the frame at every aspect ratio
- Titles of unknown length, such as data-driven names or chapter titles

Avoid:

- Headlines that should wrap onto several lines. Use `text-reveal`


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| font? | `"mono" \| "heading" \| "body"` | `"heading"` |  |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. |
| stagger? | `number` | — | Frames between units. Defaults at 30fps: char 1, word 2, line 5. |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |
| text | `string` | — |  |
| effect? | `TextRevealEffect` | — |  |
| weight? | `number` | — |  |
| color? | `string` | — |  |
| accentColor? | `string` | — |  |
| accentWords? | `string[]` | — | Words painted in the accent color. Case and punctuation are ignored. |
| align? | `"left" \| "right" \| "center"` | — |  |
| from? | `"left" \| "right" \| "below" \| "above"` | — | Where `rise`, `blur` and `mask` units travel in from. |
| order? | `StaggerOrder` | — | Which unit enters first. |
| scaleFrom? | `number` | — | Starting scale for the `scale` effect: below 1 grows in, above 1 slams down. |
| maxSize? | `number` | `240` | Largest font size in design units, reached when the text is short. |
| maxWidth? | `number` | — | Width to fill, in design units. Defaults to the safe-zone width. |
| minSize? | `number` | — | Smallest font size in design units. A title that would shrink below it wraps onto more lines instead. |
| split? | `"word" \| "char"` | — |  |