Skip to content

Typography

Our typography system is built around a set of predefined text styles that provide consistent visual hierarchy and readability across the application. The Text component is the primary way to implement these typographic styles.

Font Families

The design system uses two typefaces with optically adjusted weights for Inter:

Family

Fallback

Usage

Weights

Intersystem-ui, sans-serif

All UI text — headings, body, captions, micro

400 · 500
JetBrains Monomonospace

Code snippets, technical content, file paths

Regular · Bold

Type Scale Reference

Each text style maps to a composite Tailwind utility class (.font-*) that applies font-size, font-weight, line-height, and letter-spacing in one declaration. The corresponding CSS custom property follows the pattern --cn-{variant} (e.g. --cn-heading-hero, --cn-body-normal). Use the Text component for React, or the Tailwind class / CSS variable directly when needed.

Headings

Headings establish the information hierarchy and provide structure to content.

Variant

Preview

Specs

Tailwind Class

heading-hero

The quick brown fox

28px · 500font-heading-hero
heading-default

The quick brown fox

20px · 500font-heading-default
heading-subsection

The quick brown fox

18px · 500font-heading-subsection
heading-base

The quick brown fox

16px · 500font-heading-base
heading-small

The quick brown fox

14px · 500font-heading-small

Note: heading-section is not shown in the table above and will be deprecated in 2027.

Body

Body text is used for the main content.

Variant

Preview

Specs

Tailwind Class

body-normal

The quick brown fox jumps over the lazy dog.

14px · 400font-body-normal
body-strong

The quick brown fox jumps over the lazy dog.

14px · 500font-body-strong
body-code

npm install @harnessio/ui

12px · monofont-body-code
body-code-strong

npm install @harnessio/ui

12px · mono bold

font-body-code-strong

Captions

Captions are used for labels and metadata.

Variant

Preview

Specs

Tailwind Class

caption-normal

Label text for UI elements

12px · 400font-caption-normal
caption-strong

Label text for UI elements

12px · 500font-caption-strong
caption-codev2.4.1-beta12px · monofont-caption-code
caption-code-strong

v2.4.1-beta

12px · mono bold

font-caption-code-strong

Single line

Single-line variants are for text inside fixed-height controls and components where it must stay on one line: buttons, badges, tags, menu and sidebar items, and table cells. They use a fixed 16px line-height, so truncate overflowing text instead of letting it wrap. Don’t use them for sentences, descriptions, paragraphs, headings, or titles; use body-normal, caption-normal, or a heading variant instead.

Variant

Preview

Specs

Tailwind Class

body-single-line-normal

Label text

14px · 400 · 16px line-height

font-body-single-line-normal
body-single-line-strong

Label text

14px · 500 · 16px line-height

font-body-single-line-strong
caption-single-line-normal

Metadata text

12px · 400 · 16px line-height

font-caption-single-line-normal

Micro

Variant

Preview

Specs

Tailwind Class

micro-normal

Labels, signatures, technical info

11px · 500font-micro-normal

Text Colors

Text colors help establish visual hierarchy and convey meaning.

Hierarchy

Color

PreviewUsage

Tailwind Class

foreground-1

The quick brown fox

Headings, primary contenttext-cn-1
foreground-2

The quick brown fox

Body text (default), placeholder, Labels, secondary info

text-cn-2
foreground-3

The quick brown fox

Disabled texttext-cn-3

Semantic

Color

PreviewUsage

Tailwind Class

successSuccess

Positive feedback, completion states

text-cn-success
warningWarning

Caution messages, attention needed

text-cn-warning
dangerErrorErrors, destructive actionstext-cn-danger
mergedMergedGit merged statetext-cn-merged
brandBrandBrand accent, linkstext-cn-brand

Text Alignment

Control horizontal text alignment.

Text Wrapping

Control how text wraps within containers.

Truncation & Line Clamp

Limit text display with truncation or line clamping.

Primitive Tokens

Font Size Scale

Individual font size tokens are available via text-cn-size-{n} classes. These set only font-size — for complete text styles, prefer the composite .font-* classes above.

ClassSizeClassSizeClassSize
text-cn-size-08.8pxtext-cn-size-616pxtext-cn-size-1028px
text-cn-size-110.25pxtext-cn-size-718pxtext-cn-size-1136px
text-cn-size-211.5pxtext-cn-size-820pxtext-cn-size-1248px
text-cn-size-312pxtext-cn-size-924pxtext-cn-size-1596px
text-cn-size-514px

Line Height Scale

Line heights follow a flat 4px grid. For typography, prefer the composite .font-* styles above (or the Text component) — the font shorthand already pairs line-height with font-size, keeping size and leading in their intended relationship.

When you do need to set line-height on its own, use the token-backed leading-cn-* utility (leading-cn-8 … leading-cn-40) rather than Tailwind’s stock leading-* classes or hard-coded pixel values. The stock classes are unitless multipliers that drift off the 4px grid (e.g. leading-tight on 12px = 15px); leading-cn-* always lands on-grid and tracks the ramp from a single source of truth.

For the occasional layout case — e.g. sizing a placeholder box to a line of text — reference the token directly as an arbitrary value rather than hard-coding a pixel height, so it stays in sync with the type: h-[var(--cn-line-height-20)].

Utility ClassCSS VariableValuePixels
leading-cn-8—cn-line-height-80.5rem8px
leading-cn-12—cn-line-height-120.75rem12px
leading-cn-16—cn-line-height-161rem16px
leading-cn-20—cn-line-height-201.25rem20px
leading-cn-24—cn-line-height-241.5rem24px
leading-cn-28—cn-line-height-281.75rem28px
leading-cn-32—cn-line-height-322rem32px
leading-cn-36—cn-line-height-362.25rem36px
leading-cn-40—cn-line-height-402.5rem40px

Letter Spacing

ClassValueUsagePreview
tracking-cn-tight-0.01emHeadings

The quick brown fox

tracking-cn-normal0emDefault body text

The quick brown fox

tracking-cn-wide0.025emImproved readability

The quick brown fox

Font Weight

Weight tokens are named buckets. Each bucket name is the conventional CSS weight number (400, 500), and each value is the optically-tuned variable-font instance that actually renders. Reach for these via .font-* classes or <Text>, not raw weights.

Family

Bucket (token)

Optical value

Reads as

Example
Inter400400Regular

The quick brown fox jumps over the lazy dog.

Inter500500Medium

The quick brown fox jumps over the lazy dog.

JetBrains Mono400400Regular

The quick brown fox jumps over the lazy dog.

JetBrains Mono700700Bold

The quick brown fox jumps over the lazy dog.