# Typography
A polymorphic text component that applies consistent typographic styles from the Vesper design system. Supports a wide range of display, heading, copy, and label variants.
```tsx demo
import { Typography } from "@tenstorrent/vesper/typography";
export default function TypographyDemo() {
return (
The quick brown fox
);
}
```
## Options
| Prop | Type | Description | Default |
| ---------- | ------------------- | ---------------------------------------------------------------------------- | ----------- |
| `variant` | `TypographyVariant` | The typographic style variant to apply. See the full list of variants below. | `"copy-md"` |
| `as` | `ElementType` | The root element type for polymorphic rendering. | `"p"` |
| `children` | `ReactNode` | The text content. | — |
All other props are forwarded to the underlying `
` element, or whichever root element is specified via the `as` prop.
### Available Variants
| Category | Variants |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Display | `display-sm`, `display-md`, `display-lg` |
| Heading | `heading-xs`, `heading-sm`, `heading-md`, `heading-lg`, `heading-xl`, `heading-2xl` |
| Copy | `copy-xs`, `copy-xs-bold`, `copy-xs-mono`, `copy-sm`, `copy-sm-bold`, `copy-md`, `copy-md-bold`, `copy-lg`, `copy-lg-bold`, `copy-xl`, `copy-xl-bold` |
| Label | `label-xs`, `label-xs-bold`, `label-xs-mono`, `label-sm`, `label-sm-bold`, `label-sm-mono`, `label-md`, `label-md-bold`, `label-md-mono`, `label-lg`, `label-lg-bold` |
A `variant` only controls how text looks; it has no bearing on the element that gets rendered. Pair it with the `as` prop so the rendered element matches the meaning of the text, eg. `as="h1"` for a page title, `as="a"` for inline links, etc.
## Examples
### Basic usage
Render `Typography` by giving it some children. Without a `variant` or `as` prop, it renders a `
` element styled with the `copy-md` variant:
```tsx demo
import { Typography } from "@tenstorrent/vesper/typography";
export default function BasicTypography() {
return Body copy for paragraphs and general content.;
}
```
### Display variants
`display-*` variants are the largest text styles available, meant for hero sections and marketing pages:
```tsx demo
import { Typography } from "@tenstorrent/vesper/typography";
export default function DisplayTypography() {
return (
Display small
Display medium
Display large
);
}
```
### Heading variants
`heading-*` variants cover the six levels of section titles you'll reach for within an interface:
```tsx demo
import { Typography } from "@tenstorrent/vesper/typography";
export default function HeadingTypography() {
return (
Heading xs
Heading sm
Heading md
Heading lg
Heading xl
Heading 2xl
);
}
```
### Copy variants
`copy-*` variants are for running text: paragraphs, descriptions, and anything else a user reads as prose:
```tsx demo
import { Typography } from "@tenstorrent/vesper/typography";
export default function CopyTypography() {
return (
Copy xs
Copy xs bold
Copy sm
Copy sm bold
Copy md
Copy md bold
Copy lg
Copy lg bold
Copy xl
Copy xl bold
);
}
```
### Label variants
`label-*` variants are for UI text rather than prose: form labels, buttons, table headers, and other short strings that annotate a control:
```tsx demo
import { Typography } from "@tenstorrent/vesper/typography";
export default function LabelTypography() {
return (
Label xs
Label sm
Label md
Label lg
Label md bold
);
}
```
### Monospace variants
The `-mono` variants render in the design system's monospace font, which is useful for values where character alignment matters, such as identifiers, measurements, and timestamps:
```tsx demo
import { Typography } from "@tenstorrent/vesper/typography";
export default function MonoTypography() {
return (
build-4f2c19a
128.0 GB/s
2025-09-17T12:37:04Z
);
}
```
> [!NOTE]
>
> To render a snippet of code inline with other text, reach for [the `Code` component](./code.mdx) instead, which renders monospaced text on a tinted background, sized to match the surrounding font size.
### Polymorphic usage
You can use the `as` prop to specify what underlying element to render:
```tsx demo
import { Typography } from "@tenstorrent/vesper/typography";
export default function PolymorphicTypography() {
return (
Welcome to Vesper
Email address
Bold inline text
);
}
```