Skip to content

font-family

Utilities for controlling the font family of an element.

Class Effect
font-sans font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
font-serif font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
font-mono font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
font-[<value>] font-family: <value>;

Use font-sans, font-serif and font-mono. Each is a token that maps to a registered family, so a theme can swap faces app-wide.

font-family: Basic examplefont-family: Basic example
if ui.div("flex flex-col gap-6") {
specimen("font-sans", "font-sans text-xl font-medium")
specimen("font-serif", "font-serif text-xl font-medium")
specimen("font-mono", "font-mono text-xl font-medium")
}