---
title: "Typography"
description: "Heading, Text, and Eyebrow for page text. The heading level sets the tag and the size sets the look. Heading sizes shrink on small screens and never grow."
url: https://gelatinui.com/components/typography
markdown_url: https://gelatinui.com/components/typography.md
access: free
install: "npx shadcn@latest add @gelatin-ui/typography"
registry_item: https://gelatinui.com/r/typography.json
version: "2026-11-08"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Typography

> Heading, Text, and Eyebrow for page text. The heading level sets the tag and the size sets the look. Heading sizes shrink on small screens and never grow.

Page: https://gelatinui.com/components/typography

## When to use it

Best for: Page text: headings, body copy, and a short eyebrow topic above a heading.

- Use `Heading` for page and section titles. Set `level` for the outline and `size` for the look.
- Use `Text` for body copy, `lead` for the first paragraph under a hero, and `xs` only for fine print.
- Use `Eyebrow` for a short topic above a heading. Write it in normal case: CSS sets the capitals.

## When not to use it

- For the name of a form field, use a [Label](https://gelatinui.com/components/label.md).

## Notes for agents

- On `Heading`, `level` sets the tag (the outline) and `size` sets the look; set both.
- Write `Eyebrow` text in normal case: CSS sets the capitals.

## Anatomy

```text
Heading
├─ Text (0..n)
└─ Eyebrow (0..n)
```

## API reference

### Heading

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"2xl" \| "display" \| "lg" \| "md" \| "sm" \| "xl"` |  |  |
| `level` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | 2 | The heading level: it sets the tag (`<h1>` to `<h6>`), so the page outline that screen readers list stays right. Default 2: a section heading. |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### Text

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"lead" \| "lg" \| "md" \| "sm" \| "xs"` | "md" |  |
| `variant` | `"default" \| "muted"` | "default" |  |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### Eyebrow

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| Heading | `typography-heading` |  |  |  |
| Text | `typography-text` |  |  |  |
| Eyebrow | `typography-eyebrow` |  |  |  |

## Usage

`level` sets the tag (`<h1>` to `<h6>`) and `size` sets the look, so the page outline stays right. With no `size`, the size follows the level.

```tsx title="pricing-intro.tsx"
import { Eyebrow, Heading, Text } from "@/components/ui/typography";

export function PricingIntro() {
  return (
    <section aria-labelledby="pricing" className="flex max-w-xl flex-col gap-3">
      <Eyebrow>Pricing</Eyebrow>
      <Heading id="pricing" level={2} size="2xl">
        One plan for every team
      </Heading>
      <Text size="lead" variant="muted">
        Start free. Pay only when your team grows past five people.
      </Text>
    </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/typography
```

It adds 1 registry items: 1 files, 166 lines, and the npm packages `@base-ui/react`, `tailwind-merge`, `tailwind-variants`.

## 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

- [Label](https://gelatinui.com/components/label.md)
- [Kbd](https://gelatinui.com/components/kbd.md)

## Accessibility

`Heading` renders `<h1>` to `<h6>` from `level` (default 2). A large `size` does not change the level, so the outline that screen readers list stays right.

`Eyebrow` renders a `<p>` before the heading. It is not part of the heading name. Write it in normal case: CSS sets the capitals, so a screen reader does not spell the word letter by letter.

The fluid heading sizes have a `rem` part, so browser zoom still changes them. Headings never get larger on small screens.

`Text` renders a `<p>`. Pass `render={<span />}` or `render={<li />}` for another element.
