Skip to content
Vertical Jump Designs-uiFront-End Studio
Get Pro

v3.9 is out.

Layout & primitives

Typography

Free1.8 KB gzipped

Four components for text: Display for hero headlines, Heading for section titles, Text for running copy, and Eyebrow for the small label above a heading. Each one separates the semantic element (level or as) from its visual size, so the document outline never has to bend to the design.

Accessibility: WCAG 2.2 AA · No A or AA violations in light or dark mode · No keyboard interaction of its own · Full report

Import

tsx
import { Heading, Display, Text, Eyebrow } from "@vjdesigns/vjdesigns-ui";

Importing only Typography adds about 1.8 KB of minified, gzipped JavaScript to your app (React not included). The stylesheet is shared by every component and loaded once: 75.1 KB gzipped.

Examples

Hierarchy

The display font for headlines and headings, the body font for text. level sets the element; size sets the look.

Case study

Shipping faster with fewer bugs

How one team cut review time in half

Six months after adopting a shared component library, the team spends less time on UI details and more on the product.

tsx
import {
  Display,
  Eyebrow,
  Heading,
  Stack,
  Text,
} from "@vjdesigns/vjdesigns-ui";

export function Hierarchy() {
  return (
    <Stack gap={3} style={{ width: "100%", maxWidth: "34rem" }}>
      <Eyebrow>Case study</Eyebrow>
      <Display level={2} size="4xl">
        Shipping faster with fewer bugs
      </Display>
      <Heading level={3} size="xl">
        How one team cut review time in half
      </Heading>
      <Text tone="muted" leading="relaxed">
        Six months after adopting a shared component library, the team spends less time on UI details and more on the
        product.
      </Text>
    </Stack>
  );
}

Text styles

Large text for introductions

Default body text

Small, muted text for supporting details

Bold and primary

Monospaced: 0123456789

All caps label

tsx
import { Stack, Text } from "@vjdesigns/vjdesigns-ui";

export function TextStyles() {
  return (
    <Stack gap={2}>
      <Text size="lg">Large text for introductions</Text>
      <Text>Default body text</Text>
      <Text size="sm" tone="muted">
        Small, muted text for supporting details
      </Text>
      <Text weight="bold" tone="primary">
        Bold and primary
      </Text>
      <Text mono size="sm">
        Monospaced: 0123456789
      </Text>
      <Text caps size="xs" weight="semibold">
        All caps label
      </Text>
    </Stack>
  );
}

Truncation

truncate cuts one line with an ellipsis; lineClamp does the same after several lines.

Accessible, themeable components with light and dark modes, five brand palettes, and TypeScript types for every prop, ready to drop into your next project.

Accessible, themeable components with light and dark modes, five brand palettes, and TypeScript types for every prop, ready to drop into your next project.

tsx
import { Stack, Text } from "@vjdesigns/vjdesigns-ui";

export function Truncation() {
  const long =
    "Accessible, themeable components with light and dark modes, five brand palettes, and TypeScript types for every prop, ready to drop into your next project.";
  return (
    <Stack gap={4} style={{ width: "100%", maxWidth: "20rem" }}>
      <Text truncate>{long}</Text>
      <Text lineClamp={2} tone="muted">
        {long}
      </Text>
    </Stack>
  );
}

Accessibility

The semantic level and the visual size are separate: this Heading is an <h3> in the outline but small on screen. truncate and lineClamp only clip visually; the full text stays in the page for screen readers.

Order summary

Wireless noise-cancelling headphones, midnight blue, with travel case

tsx
import { Heading, Stack, Text } from "@vjdesigns/vjdesigns-ui";

export function Accessibility() {
  return (
    <Stack gap={2} style={{ width: "100%", maxWidth: "20rem" }}>
      <Heading level={3} size="md">
        Order summary
      </Heading>
      <Text truncate>Wireless noise-cancelling headphones, midnight blue, with travel case</Text>
    </Stack>
  );
}

Translated

LocaleProvider sets lang="ja", so browsers pick Japanese fonts and line-breaking rules and screen readers use Japanese. The text is your own.

お知らせ

新しいダッシュボード

よく使う数値を、ひと目で確認できるようになりました。

tsx
import {
  Eyebrow,
  Heading,
  Stack,
  Text,
  LocaleProvider,
} from "@vjdesigns/vjdesigns-ui";
import ja from "@vjdesigns/vjdesigns-ui/locales/ja";

export function Translated() {
  return (
    <LocaleProvider locale="ja" messages={ja}>
      <Stack gap={2} style={{ width: "100%", maxWidth: "24rem" }}>
        <Eyebrow>お知らせ</Eyebrow>
        <Heading level={3} size="xl">
          新しいダッシュボード
        </Heading>
        <Text tone="muted">よく使う数値を、ひと目で確認できるようになりました。</Text>
      </Stack>
    </LocaleProvider>
  );
}

Right to left

The first example again, inside a right-to-left LocaleProvider (Arabic). Layout, spacing and arrow icons mirror, and the components' built-in text is translated. The example's own text stays in English.

Hierarchy

Case study

Shipping faster with fewer bugs

How one team cut review time in half

Six months after adopting a shared component library, the team spends less time on UI details and more on the product.

tsx
import { LocaleProvider } from "@vjdesigns/vjdesigns-ui";
import ar from "@vjdesigns/vjdesigns-ui/locales/ar";

// Hierarchy is the "Hierarchy" example above.
<LocaleProvider locale="ar" messages={ar}>
  <Hierarchy />
</LocaleProvider>

API reference

Heading

Athletic display heading in --font-display: bold, tight, high contrast. level sets the semantics; size sets the look.

Heading props
PropTypeDefault
level

Semantic level; renders h1-h6. Choose it by document outline, not looks.

123456—
size

Visual size, independent of level. Defaults by level: 1 4xl, 2 3xl, 3 2xl, 4 xl, 5 lg, 6 md.

"xs""sm""md""lg""xl""2xl""3xl""4xl""5xl""6xl"—
balance

Balance line lengths (text-wrap: balance).

boolean—
weight

Font weight.

"regular""medium""semibold""bold""black"—
tone

Text color, from contrast-verified tokens.

"default""muted""primary""accent""success""warning""danger""info""inherit"—
align

Horizontal alignment.

"start""center""end""justify"—
caps

Uppercase with wide --letter-spacing-caps tracking.

boolean—
truncate

Keep to one line and cut off with an ellipsis. The full text stays in the DOM for screen readers; give sighted users a way to see it (e.g. title).

boolean—
lineClamp

Clamp to this many lines, ending in an ellipsis.

number—
className

Additional class names, merged with the component's own.

string—
style

Inline styles, merged with the dynamic lineClamp style.

CSSProperties—
as

The element to render.

"h1""h2""h3""h4""h5""h6""p""span""div""legend"—

Also accepts standard HTML attributes, plus className, style and ref.

Display

Hero-sized heading: Heading with level={1}, size="6xl", and weight="black" by default. Every Heading prop still applies.

Display props
PropTypeDefault
level

Semantic level; renders h1-h6. Choose it by document outline, not looks.

123456—
size

Visual size, independent of level. Defaults by level: 1 4xl, 2 3xl, 3 2xl, 4 xl, 5 lg, 6 md.

"xs""sm""md""lg""xl""2xl""3xl""4xl""5xl""6xl"—
balance

Balance line lengths (text-wrap: balance).

boolean—
weight

Font weight.

"regular""medium""semibold""bold""black"—
tone

Text color, from contrast-verified tokens.

"default""muted""primary""accent""success""warning""danger""info""inherit"—
align

Horizontal alignment.

"start""center""end""justify"—
caps

Uppercase with wide --letter-spacing-caps tracking.

boolean—
truncate

Keep to one line and cut off with an ellipsis. The full text stays in the DOM for screen readers; give sighted users a way to see it (e.g. title).

boolean—
lineClamp

Clamp to this many lines, ending in an ellipsis.

number—
className

Additional class names, merged with the component's own.

string—
style

Inline styles, merged with the dynamic lineClamp style.

CSSProperties—
as

The element to render.

"h1""h2""h3""h4""h5""h6""p""span""div""legend"—

Also accepts standard HTML attributes, plus className, style and ref.

Text

Friendly body text in --font-body. Renders a p by default.

Text props
PropTypeDefault
size

Font size. Block elements default to md; inline elements (span, strong, em, code, ...) default to inherit so they fit their parent.

"sm""md""lg""xs""xl""2xl""inherit"—
tone

Text color. Block elements default to default; inline elements default to inherit.

"default""muted""primary""accent""success""warning""danger""info""inherit"—
leading

Line height. Defaults to normal on block elements; inherited otherwise.

"tight""snug""normal""relaxed"—
italic

Italic style.

boolean—
mono

Use the monospace font (--font-mono).

boolean—
wrap

Line wrapping behavior.

"wrap""nowrap""balance""pretty"—
weight

Font weight.

"regular""medium""semibold""bold""black"—
align

Horizontal alignment.

"start""center""end""justify"—
caps

Uppercase with wide --letter-spacing-caps tracking.

boolean—
truncate

Keep to one line and cut off with an ellipsis. The full text stays in the DOM for screen readers; give sighted users a way to see it (e.g. title).

boolean—
lineClamp

Clamp to this many lines, ending in an ellipsis.

number—
className

Additional class names, merged with the component's own.

string—
style

Inline styles, merged with the dynamic lineClamp style.

CSSProperties—
as

The element to render.

TextElement—

Also accepts standard HTML attributes, plus className, style and ref.

Eyebrow

Short uppercase overline above a heading, in the display font. Text with caps, weight="bold", size="sm", and tone="primary" by default. Renders a p by default; it is not a heading, so it is not in the outline.

Eyebrow props
PropTypeDefault
size

Font size. Block elements default to md; inline elements (span, strong, em, code, ...) default to inherit so they fit their parent.

"sm""md""lg""xs""xl""2xl""inherit"—
tone

Text color. Block elements default to default; inline elements default to inherit.

"default""muted""primary""accent""success""warning""danger""info""inherit"—
leading

Line height. Defaults to normal on block elements; inherited otherwise.

"tight""snug""normal""relaxed"—
italic

Italic style.

boolean—
mono

Use the monospace font (--font-mono).

boolean—
wrap

Line wrapping behavior.

"wrap""nowrap""balance""pretty"—
weight

Font weight.

"regular""medium""semibold""bold""black"—
align

Horizontal alignment.

"start""center""end""justify"—
caps

Uppercase with wide --letter-spacing-caps tracking.

boolean—
truncate

Keep to one line and cut off with an ellipsis. The full text stays in the DOM for screen readers; give sighted users a way to see it (e.g. title).

boolean—
lineClamp

Clamp to this many lines, ending in an ellipsis.

number—
className

Additional class names, merged with the component's own.

string—
style

Inline styles, merged with the dynamic lineClamp style.

CSSProperties—
as

The element to render.

TextElement—

Also accepts standard HTML attributes, plus className, style and ref.

See what changed in each version in the Changelog.

Accessibility report

Typography targets WCAG 2.2 AA. Below: a live axe-core audit of this page's examples, Lighthouse scores for the page in both modes, the accessibility behavior built into the component, and the checks only a person can do.

axe-core audit (live)

Running accessibility audit

Checking the examples above…

Lighthouse audit

Light mode

Score 100

35 passed · 0 failed · 30 not applicable · 10 to check by hand

Dark mode

Score 100

35 passed · 0 failed · 30 not applicable · 10 to check by hand

Lighthouse 13.5.0 audits the whole docs page (header and sidebar included), not just the examples, in English. Last run 11/27/2026. Some failed audits carry no weight in the score, so a page can score 100 and still list one.

Built-in behavior

Keyboard

Not focusable, so there's no keyboard interaction of its own.

Roles and states

Roles and states
ElementRoleStates and properties
Heading, DisplayheadingLevel from level (<h1>–<h6>), separate from the visual size
Text, Eyebrownone (generic) or paragraphElement from as

Manual checks

Automated tools find roughly a third of accessibility issues. Test these in your app, with your content.

Manual accessibility checks
CheckWhat to testWCAG 2.2
KeyboardEvery action works with Tab, Shift+Tab, Enter, Space and the arrow keys, and focus never gets stuck.2.1.1 (A), 2.1.2 (A)
FocusFocus moves in a logical order, is always visible, and isn't hidden behind sticky headers.2.4.3 (A), 2.4.7 (AA), 2.4.11 (AA), 2.4.13 (AAA)
Screen readersNames, roles and states are announced correctly, and status changes are announced without moving focus.1.3.1 (A), 4.1.2 (A), 4.1.3 (AA)
ColorMeaning never depends on color alone; your own colors meet contrast in both modes.1.4.1 (A), 1.4.3 (AA), 1.4.11 (AA), 1.4.6 (AAA)
Zoom and reflowAt 200% text size and at 320px wide (400% zoom), nothing is cut off and no sideways scrolling is needed.1.4.4 (AA), 1.4.10 (AA), 1.4.12 (AA)
Pointer targetsClick and tap targets are at least 24×24px (44×44px for AAA), or spaced so they don't overlap.2.5.8 (AA), 2.5.5 (AAA)
MotionAnimations respect the reduced-motion setting.2.3.3 (AAA)