Typography
Standalone semantic text exports: heading, text, code, blockquote
Start Here
Start from the smallest working snippet, then move to interactive examples and the full API contract below.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { Typography } from '@dryui/ui';
</script>
<Typography.Heading level={2}>Launch readiness</Typography.Heading>
<Typography.Text color="muted" size="sm">Use Typography.Text for supporting copy and metadata.</Typography.Text>Import options
Root package
import { Typography } from '@dryui/ui'Per-component subpath
import { Typography } from '@dryui/ui/typography'Customize
Use the interactive examples to see common variants, states, and composition patterns before building your own.
Headings
Heading 1
Heading 2
Heading 3
Heading 4
<script lang="ts">
import { Typography } from '@dryui/ui';
</script>
<Typography.Heading level={1}>Heading 1</Typography.Heading>
<Typography.Heading level={2}>Heading 2</Typography.Heading>
<Typography.Heading level={3}>Heading 3</Typography.Heading>
<Typography.Heading level={4}>Heading 4</Typography.Heading>Text
This is a paragraph of text demonstrating the Typography component.
<script lang="ts">
import { Typography } from '@dryui/ui';
</script>
<Typography.Text color="secondary" size="lg">
This is a paragraph of text demonstrating the Typography component.
</Typography.Text>Code
const x = 42;<script lang="ts">
import { Typography } from '@dryui/ui';
</script>
<Typography.Code>const x = 42;</Typography.Code>Blockquote
The best way to predict the future is to invent it. — Alan Kay
<script lang="ts">
import { Typography } from '@dryui/ui';
</script>
<Typography.Blockquote>
The best way to predict the future is to invent it. — Alan Kay
</Typography.Blockquote>Structure
This component exposes its parts directly. Use the part component you need instead of wrapping everything in Typography.Root.
Typography is a namespaced set of standalone text parts. Use Typography.Heading or Typography.Text directly; there is no Typography.Root wrapper.
Compose
The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.
Namespace parts are used directly. Add the specific part you need and skip a Typography.Root wrapper.
Typography is a namespaced set of standalone text parts. Use Typography.Heading or Typography.Text directly; there is no Typography.Root wrapper.
Typography.Heading
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
level | 123456 | — | — | — |
children | Snippet | — | ✓ | — |
Forwards <h*> attributes via rest props. Common examples: id, style, aria-label.
Typography.Text
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
as | pspandiv | — | — | — |
color | defaultmutedsecondary Use muted or secondary for supporting copy without reaching for inline color styles. | — | — | — |
variant | defaultmutedsecondary | — | — | — |
size | smmdlg Applies DryUI text scale tokens for compact or emphasized body copy. | — | — | — |
children | Snippet | — | ✓ | — |
Forwards <element> attributes via rest props. Common examples: id, class, aria-label.
Typography.Code
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Forwards <element> attributes via rest props. Common examples: id, class, aria-label.
Typography.Blockquote
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Forwards <blockquote> attributes via rest props. Common examples: id, style, aria-label.