Foundations

Typography

Size, family, weight, tracking, and leading tokens with paired default line-heights. Tune a specimen in the studio, then use the guide and API below.

Type studio

Pick a role or scale step, then adjust family, weight, tracking, and leading. Copy the active class list or token from the meta strip.

Export CSS variables

Size utilities set font-size and a paired default line-height. Adjust weight, tracking, or leading on the specimen without leaving the stage.

--df-text-2xl

Scale

Select a step to load the specimen

Examples

Product chrome patterns using the type scale. Prefer utilities for layout; reach for tokens when a style prop needs a length.

Tool labels

Compact uppercase labels for docks, panels, and control groups.

Export

Format

CSS variables

Density

--df-neutral-detailed-500

Panel copy

Title and supporting line for cards, empty states, and side panels.

Neutral scale

Compact and detailed aliases share the same step names. Utilities follow the active color scale mode on the document root.

Weight and tracking

Keep size stable and change weight or tracking for emphasis.

Normal body copy for panel descriptions and helper text.

Medium weight for secondary emphasis in tool chrome.

Semibold for section titles and primary actions.

Section label

Leading override

Each text-* size ships a default line-height. Override with leading-* when the measure needs to change.

text-sm leading-5

Size utilities already include a default line-height. Use a separate leading class when a block needs a tighter or looser measure.

text-sm leading-7

Size utilities already include a default line-height. Use a separate leading class when a block needs a tighter or looser measure.

Families

Sans for UI, mono for tokens and filenames, heading for page titles.

font-sans

Interface copy for tools and product UI.

font-mono

--df-text-sm · tokens.css

font-heading

Page title

Display

Large steps for marketing or catalogue heroes. Host apps may also load a display face such as font-bricolage.

Default File

Large steps pair with leading-none by default. Tighten tracking on display lines when the letters feel open.

Token naming

Primitive type values are CSS custom properties on :root. Utilities resolve through those tokens.

  • Size: --df-text-{step}, for example --df-text-sm.
  • Family: --df-font-sans and --df-font-mono.
  • Weight: --df-font-weight-{name}, for example --df-font-weight-semibold.
  • Tracking: --df-tracking-{name}, for example --df-tracking-tight.
  • Leading: --df-leading-{name}, for example --df-leading-5.

Name shape

Token naming

--df-text-sm
--df-font-sans
--df-font-weight-semibold
--df-tracking-tight
--df-leading-5

Size and default leading

The scale runs from text-9 (9px) to text-display. Each size utility sets font-size and a paired default line-height.

  • UI chrome often uses text-11, text-2xs, text-xs, and text-sm.
  • Body and panel copy typically use text-sm or text-base.
  • Titles use text-lg to text-4xl with tracking-tight or tracking-snug.
  • Steps from text-5xl upward pair with leading-none by default.
  • Override with leading-* when a block needs a different measure. Do not invent a combined size and leading syntax.

Markup

Size and leading

<p className="text-sm">
Uses --df-text-sm and the paired default leading.
</p>
<p className="text-sm leading-7">
Same size, explicit leading override.
</p>

Font families

Three utilities cover day-to-day UI. Host apps set --font-sans and --font-mono; the kit stacks fall back to system faces.

  • font-sans: primary interface stack via --df-font-sans.
  • font-mono: code, tokens, and filenames via --df-font-mono.
  • font-heading: title stack. Resolves to the same sans token unless the host remaps it.

Markup

Families

<p className="font-sans">Interface copy</p>
<code className="font-mono text-xs">--df-neutral-500</code>
<h1 className="font-heading text-3xl font-semibold">Title</h1>

Weight and tracking

Weight runs from thin to black. Tracking covers display through widest, including a label step for uppercase chrome.

  • Prefer medium or semibold for emphasis before increasing size.
  • tracking-label and tracking-wider suit uppercase section labels.
  • tracking-tight and tracking-display suit large titles.

Markup

Weight and tracking

<p className="text-sm font-semibold tracking-tight">
Panel title
</p>
<p className="text-11 font-semibold uppercase tracking-label text-muted-foreground">
Controls
</p>

Utilities and tokens

Prefer generated utilities in className. Use var() when a style prop, canvas label, or non-class surface needs the raw length.

Utility

Utility usage

<span className="text-11 font-medium tracking-wide text-muted-foreground">
Density
</span>

Token

Token usage

<div
style={{
fontSize: "var(--df-text-sm)",
lineHeight: "var(--df-leading-5)",
}}
/>

Relative and display

Two special sizes sit beside the fixed rem ladder.

  • --df-text-relative-sm (0.85em): inline code and compact chrome relative to the parent. Use text-[length:var(--df-text-relative-sm)].
  • --df-text-display: fluid clamp from 4.5rem to 9rem for hero lines. Utility class: text-display.
  • --df-leading-code: line-height for code blocks and terminal previews.

Relative size

Relative size

<code className="rounded bg-muted px-1 py-0.5 font-mono text-[length:var(--df-text-relative-sm)]">
data-df-color-scale
</code>

Common recipes

Short patterns used across tools and catalogue chrome.

Dock or panel label

Label recipe

<p className="text-11 font-semibold uppercase tracking-wider text-muted-foreground">
Layers
</p>

Page title

Title recipe

<h1 className="font-bricolage text-3xl font-semibold tracking-tight text-foreground sm:text-4xl">
Typography
</h1>

Supporting copy

Body recipe

<p className="text-sm leading-relaxed text-muted-foreground sm:text-base">
Browse the scale, then read the usage guide below.
</p>

Properties

Typography tokens and utilities for size, family, weight, tracking, and leading. Size utilities set font-size and a paired default line-height. Override leading with a separate leading utility when needed.

Font size tokens

Primitive sizes on :root. Prefer text-* utilities in markup; use var() when a style prop or non-class surface needs the length.

PropTypeDefaultNotes
--df-text-9length0.5625remFont size for text-9. Default leading: --df-leading-3.
--df-text-2xslength0.625remFont size for text-2xs. Default leading: --df-leading-3.
--df-text-11length0.6875remFont size for text-11. Default leading: --df-leading-4.
--df-text-xslength0.75remFont size for text-xs. Default leading: --df-leading-4.
--df-text-13length0.8125remFont size for text-13. Default leading: --df-leading-4.
--df-text-smlength0.875remFont size for text-sm. Default leading: --df-leading-5.
--df-text-baselength1remFont size for text-base. Default leading: --df-leading-6.
--df-text-lglength1.125remFont size for text-lg. Default leading: --df-leading-7.
--df-text-xllength1.25remFont size for text-xl. Default leading: --df-leading-7.
--df-text-2xllength1.5remFont size for text-2xl. Default leading: --df-leading-8.
--df-text-3xllength1.875remFont size for text-3xl. Default leading: --df-leading-9.
--df-text-4xllength2.25remFont size for text-4xl. Default leading: --df-leading-10.
--df-text-5xllength3remFont size for text-5xl. Default leading: --df-leading-none.
--df-text-6xllength3.75remFont size for text-6xl. Default leading: --df-leading-none.
--df-text-7xllength4.5remFont size for text-7xl. Default leading: --df-leading-none.
--df-text-8xllength6remFont size for text-8xl. Default leading: --df-leading-none.
--df-text-9xllength8remFont size for text-9xl. Default leading: --df-leading-none.
--df-text-displaylengthclamp(4.5rem, 12vw, 9rem)Font size for text-display. Default leading: --df-leading-none.

Font size utilities

Each class sets font-size and the paired default line-height from the theme map.

PropTypeDefaultNotes
text-9utility--df-text-9, --df-leading-39px. Paired leading 3.
text-2xsutility--df-text-2xs, --df-leading-310px. Paired leading 3.
text-11utility--df-text-11, --df-leading-411px. Paired leading 4.
text-xsutility--df-text-xs, --df-leading-412px. Paired leading 4.
text-13utility--df-text-13, --df-leading-413px. Paired leading 4.
text-smutility--df-text-sm, --df-leading-514px. Paired leading 5.
text-baseutility--df-text-base, --df-leading-616px. Paired leading 6.
text-lgutility--df-text-lg, --df-leading-718px. Paired leading 7.
text-xlutility--df-text-xl, --df-leading-720px. Paired leading 7.
text-2xlutility--df-text-2xl, --df-leading-824px. Paired leading 8.
text-3xlutility--df-text-3xl, --df-leading-930px. Paired leading 9.
text-4xlutility--df-text-4xl, --df-leading-1036px. Paired leading 10.
text-5xlutility--df-text-5xl, --df-leading-none48px. Paired leading none.
text-6xlutility--df-text-6xl, --df-leading-none60px. Paired leading none.
text-7xlutility--df-text-7xl, --df-leading-none72px. Paired leading none.
text-8xlutility--df-text-8xl, --df-leading-none96px. Paired leading none.
text-9xlutility--df-text-9xl, --df-leading-none128px. Paired leading none.
text-displayutility--df-text-display, --df-leading-noneFluid display size. Paired leading none.

Font family tokens

Stack tokens resolve through host --font-sans and --font-mono when those variables are set.

PropTypeDefaultNotes
--df-font-sansfont-familyvar(--font-sans), ui-sans-serif, system-ui, sans-serifPrimary UI sans stack. Used by font-sans and font-heading.
--df-font-monofont-familyvar(--font-mono), ui-monospace, monospaceMonospace stack for code, tokens, and filenames.

Font family utilities

PropTypeDefaultNotes
font-sansutility--df-font-sansApplies --df-font-sans.
font-monoutility--df-font-monoApplies --df-font-mono.
font-headingutility--df-font-sansHeading stack. Resolves to the same sans token as font-sans unless the host remaps it.

Font weight tokens

PropTypeDefaultNotes
--df-font-weight-thinnumber100Weight for font-thin.
--df-font-weight-extralightnumber200Weight for font-extralight.
--df-font-weight-lightnumber300Weight for font-light.
--df-font-weight-normalnumber400Weight for font-normal.
--df-font-weight-mediumnumber500Weight for font-medium.
--df-font-weight-semiboldnumber600Weight for font-semibold.
--df-font-weight-boldnumber700Weight for font-bold.
--df-font-weight-extraboldnumber800Weight for font-extrabold.
--df-font-weight-blacknumber900Weight for font-black.

Font weight utilities

PropTypeDefaultNotes
font-thinutility--df-font-weight-thinfont-weight: 100.
font-extralightutility--df-font-weight-extralightfont-weight: 200.
font-lightutility--df-font-weight-lightfont-weight: 300.
font-normalutility--df-font-weight-normalfont-weight: 400.
font-mediumutility--df-font-weight-mediumfont-weight: 500.
font-semiboldutility--df-font-weight-semiboldfont-weight: 600.
font-boldutility--df-font-weight-boldfont-weight: 700.
font-extraboldutility--df-font-weight-extraboldfont-weight: 800.
font-blackutility--df-font-weight-blackfont-weight: 900.

Letter spacing tokens

PropTypeDefaultNotes
--df-tracking-displaylength-0.11emLetter spacing for tracking-display.
--df-tracking-tighterlength-0.05emLetter spacing for tracking-tighter.
--df-tracking-tightlength-0.025emLetter spacing for tracking-tight.
--df-tracking-snuglength-0.01emLetter spacing for tracking-snug.
--df-tracking-normallength0emLetter spacing for tracking-normal.
--df-tracking-widelength0.025emLetter spacing for tracking-wide.
--df-tracking-widerlength0.05emLetter spacing for tracking-wider.
--df-tracking-labellength0.08emLetter spacing for tracking-label.
--df-tracking-widestlength0.1emLetter spacing for tracking-widest.

Letter spacing utilities

PropTypeDefaultNotes
tracking-displayutility--df-tracking-displayletter-spacing: -0.11em.
tracking-tighterutility--df-tracking-tighterletter-spacing: -0.05em.
tracking-tightutility--df-tracking-tightletter-spacing: -0.025em.
tracking-snugutility--df-tracking-snugletter-spacing: -0.01em.
tracking-normalutility--df-tracking-normalletter-spacing: 0em.
tracking-wideutility--df-tracking-wideletter-spacing: 0.025em.
tracking-widerutility--df-tracking-widerletter-spacing: 0.05em.
tracking-labelutility--df-tracking-labelletter-spacing: 0.08em.
tracking-widestutility--df-tracking-widestletter-spacing: 0.1em.

Line height tokens

Named ratios and fixed rem steps. Size utilities already pair a default; use leading-* to override.

PropTypeDefaultNotes
--df-leading-nonenumber1Line height for leading-none.
--df-leading-tightnumber1.25Line height for leading-tight.
--df-leading-snugnumber1.375Line height for leading-snug.
--df-leading-normalnumber1.5Line height for leading-normal.
--df-leading-relaxednumber1.625Line height for leading-relaxed.
--df-leading-loosenumber2Line height for leading-loose.
--df-leading-3length0.75remLine height for leading-3.
--df-leading-4length1remLine height for leading-4.
--df-leading-5length1.25remLine height for leading-5.
--df-leading-6length1.5remLine height for leading-6.
--df-leading-7length1.75remLine height for leading-7.
--df-leading-8length2remLine height for leading-8.
--df-leading-9length2.25remLine height for leading-9.
--df-leading-10length2.5remLine height for leading-10.
--df-leading-codenumber1.7Line height for code blocks and terminal previews in the docs.
--df-text-relative-smlength0.85emRelative size for inline code and compact chrome. Use with text-[length:var(--df-text-relative-sm)].

Line height utilities

PropTypeDefaultNotes
leading-noneutility--df-leading-noneline-height: 1.
leading-tightutility--df-leading-tightline-height: 1.25.
leading-snugutility--df-leading-snugline-height: 1.375.
leading-normalutility--df-leading-normalline-height: 1.5.
leading-relaxedutility--df-leading-relaxedline-height: 1.625.
leading-looseutility--df-leading-looseline-height: 2.
leading-3utility--df-leading-3line-height: 0.75rem.
leading-4utility--df-leading-4line-height: 1rem.
leading-5utility--df-leading-5line-height: 1.25rem.
leading-6utility--df-leading-6line-height: 1.5rem.
leading-7utility--df-leading-7line-height: 1.75rem.
leading-8utility--df-leading-8line-height: 2rem.
leading-9utility--df-leading-9line-height: 2.25rem.
leading-10utility--df-leading-10line-height: 2.5rem.