Components · Typography
Heading
StableAdded v0.0.1
Semantic heading component with size, weight, and tone control.
import { Heading } from '@nexub/react';Playground
Props
The quick brown fox
<Heading>The quick brown fox</Heading>Examples
Default
Scale
Tones
States
The quick brown fox
defaultThe quick brown fox
size="display"The quick brown fox
size="h2"The quick brown fox
size="h3"The quick brown fox
size="h1"The quick brown fox
size="h4"The quick brown fox
size="h5"The quick brown fox
size="h6"The quick brown fox
tone="neutral"The quick brown fox
tone="info"The quick brown fox
tone="success"The quick brown fox
tone="warning"The quick brown fox
tone="danger"The quick brown fox
tone="leap"The quick brown fox
tone="bookub"The quick brown fox
tone="payub"
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| level | 1 | 2 | 3 | 4 | 5 | 6 | 2 | The semantic HTML heading level rendered. |
| size | 'display' | 'h2' | 'h3' | 'h1' | 'h4' | 'h5' | 'h6' | — | Visual size of the heading, independent of the semantic level. |
| tone | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'leap' | 'bookub' | 'payub' | 'founderub' | 'default' | — | Color tone applied to the heading text. |
| weight | 'bold' | 'regular' | 'medium' | 'semibold' | 'extrabold' | — | Font weight of the heading. |
| asChild | boolean | false | Merges props onto the immediate child element (Radix Slot). |
On iOS & Android
Web only
Heading has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.