Typography defines the set of semantic text styles used across the system. Each typography preset is a semantic text style that keeps reading rhythm and visual hierarchy consistent throughout the UI. Sizes come from NEB_FONT_SIZE and line heights from NEB_LINE_HEIGHT.
import { Text } from '@nebula-kit/core' export const Intro = () => ( <> <Text typography="h2">Getting started</Text> <Text typography="lead">A short summary of what follows.</Text> <Text>Body text needs no preset, body is the default.</Text> </>) export const Hero = () => ( // any preset value can be overridden <Text typography="h1" fontSize="64px"> Welcome </Text>) export const CardTitle = () => ( // the preset sets the look, elemTag sets the heading level <Text typography="h3" elemTag="h2"> Plans </Text>)Each preset renders its own tag by default: h1 renders an h1, and text presets render a p. Pick the preset for how the text should look and set elemTag when the heading level in the document outline differs.
| Name | Sample | Font size | Line height | Tag |
|---|---|---|---|---|
body | Aa | px_015 | lh_150 | p |
lead | Aa | px_017 | lh_150 | p |
small | Aa | px_013 | lh_150 | p |
caption | Aa | px_011 | lh_150 | p |
h6 | Aa | px_016 | lh_140 | h6 |
h5 | Aa | px_020 | lh_140 | h5 |
h4 | Aa | px_024 | lh_140 | h4 |
h3 | Aa | px_030 | lh_130 | h3 |
h2 | Aa | px_036 | lh_130 | h2 |
h1 | Aa | px_048 | lh_130 | h1 |
body
Default text for reading and general content. Balanced for legibility and rhythm across devices.
lead
Introductory paragraph style, larger and more open than body text, used to draw focus at the start of a section.
small
Reduced body text for secondary content. Used for descriptions, helper text, or supporting copy that remains part of the reading flow.
caption
Smallest text size for annotations and metadata. Used for labels, figure captions, timestamps, or compact UI notes outside the main content flow.
h6
Upper-body style bridging headings and text. Works for lead-ins, callouts, or compact hero banners.
h5
Small heading for titles within dense layouts: sidebars, tables, or summary lines.
h4
Mid-level heading often used in cards, panels, or feature blocks. Balances presence and compactness.
h3
Sub-section heading used to organize content within sections while keeping hierarchy clear.
h2
Primary section heading beneath the hero. Strong visual anchor for major content groups.
h1
Large display style used for page titles or hero sections. Commands attention without needing extra decoration.