PolyHunter

Typography

Typography atom covering the full DS type scale — every style maps to a type-* class in @npolyhunter/ds/theme.css, with token-based colors. Sizes scale with --font-scalebetween 768px and 1180px. Safari and mobile use the base sizes for compatibility. The form-facing Label atom is built on this scale.

Playground

Live preview

Display & headings

display-xl — The quick brown foxdisplay-large — The quick brown foxheading-page — The quick brown foxheading-section — The quick brown foxtitle-large — The quick brown foxtitle-medium — The quick brown fox
<Typography variant="display-xl">…</Typography>
<Typography variant="display-large">…</Typography>
<Typography variant="heading-page">…</Typography>
<Typography variant="heading-section">…</Typography>
<Typography variant="title-large">…</Typography>
<Typography variant="title-medium">…</Typography>

Examples

Body & labels

body-large — The quick brown fox jumps over the lazy dogbody-medium — The quick brown fox jumps over the lazy dogbody-small — The quick brown fox jumps over the lazy doglabel-medium — The quick brown fox jumps over the lazy doglabel-small — The quick brown fox jumps over the lazy dog
<Typography variant="body-large">…</Typography>
<Typography variant="body-medium">…</Typography>
<Typography variant="body-small">…</Typography>
<Typography variant="label-medium">…</Typography>
<Typography variant="label-small">…</Typography>
<Typography variant="metadata">…</Typography>

Numeric

numeric-xsmall — 1,234.56 XPnumeric-small — 1,234.56 XPnumeric-medium — 1,234.56 XPnumeric-large — 1,234.56 XPnumeric-display — 1,234.56 XP
<Typography variant="numeric-xsmall">…</Typography>
<Typography variant="numeric-small">…</Typography>
<Typography variant="numeric-medium">…</Typography>
<Typography variant="numeric-large">…</Typography>
<Typography variant="numeric-display">…</Typography>

Colors

color="default"color="subtle"color="disabled"color="placeholder"color="danger"color="action-primary"color="primary-foreground"
<Typography variant="body-medium" color="default">…</Typography>
<Typography variant="body-medium" color="subtle">…</Typography>
<Typography variant="body-medium" color="disabled">…</Typography>
<Typography variant="body-medium" color="placeholder">…</Typography>
<Typography variant="body-medium" color="danger">…</Typography>
<Typography variant="body-medium" color="action-primary">…</Typography>
<Typography variant="body-medium" color="primary-foreground">…</Typography>

Semantic elements

as="h1" — renders a real page heading

as="p" — body copy as a paragraph

as="span" + role="alert" — inline error message
<Typography as="h1" variant="heading-page">…</Typography>
<Typography as="p" variant="body-medium" color="subtle">…</Typography>
<Typography as="span" variant="body-small" color="danger" role="alert">…</Typography>

Code

import { Typography } from "@npolyhunter/ui";

// One variant per style in the DS type scale; colors are token names
<Typography as="h1" variant="heading-page">Page heading</Typography>
<Typography variant="body-medium" color="subtle">Body copy in a subtle tone.</Typography>
<Typography variant="body-small" color="danger" role="alert">Error message</Typography>

Used in

Includes use through shared UI components.

AppBack Office