Text
Passive Liquid Glass typography primitive pairing optical system font stacks with all eight Base Text axes.
Liquid Glass Text realizes Base Text across all eight independent typography axes using system sans and monospace font stacks and crisp foreground tokens, staying purely typographic with no glass material or interaction ownership of its own.
Preview
Section titled “Preview”<article class="flex max-w-xl flex-col gap-4">
<h1>
<proto-ui-liquid-glass-text
size="3xl"
font="heading"
weight="semibold"
leading="tight"
tracking="tight"
>
Spatial Clarity on Content Canvas
</proto-ui-liquid-glass-text>
</h1>
<p>
<proto-ui-liquid-glass-text
size="base"
font="body"
leading="relaxed"
>
In Liquid Glass interfaces, text stays crisp on the content
layer or inherits high-contrast ink inside a single floating
glass control—never stacking glass on glass.
</proto-ui-liquid-glass-text>
</p>
<p>
<proto-ui-liquid-glass-text
size="sm"
tone="muted"
emphasis="italic"
>
Optical system typography · SF-first sans & monospace
fallback
</proto-ui-liquid-glass-text>
</p>
<code>
<proto-ui-liquid-glass-text
size="sm"
font="mono"
tracking="tight"
decoration="underline"
>
@proto.ui/prototypes-liquid-glass/text
</proto-ui-liquid-glass-text>
</code>
</article>Installation
Section titled “Installation”Currently available from workspace source only; available starting in 0.3.0-rc.1 and later releases. Import textRoot (also exported as liquidGlassTextRoot and LiquidGlassTextRoot) from @proto.ui/prototypes-liquid-glass/text, or generate workspace facades with the liquid-glass-text CLI target.
import * as React from 'react';import { createReactAdapter } from '@proto.ui/adapter-react';import { liquidGlassTextRoot } from '@proto.ui/prototypes-liquid-glass/text';
const Text = createReactAdapter(React)(liquidGlassTextRoot, { rootTag: 'span' });
export function SheetHeading() { return ( <h2> <Text size="2xl" font="heading" weight="semibold" leading="tight" tracking="tight"> Display & Clarity </Text> </h2> );}Liquid Glass layering and legibility guidelines
Section titled “Liquid Glass layering and legibility guidelines”Following Apple’s Materials and Typography guidelines:
- Keep text off stacked glass: Long-form reading and page headings belong on the opaque content canvas. Labels inside a floating Liquid Glass control or bar use
tone="inherit"to pick up crisp foreground ink—never turn Text itself into a glass surface or stack glass on glass. - Regular vs. prominent contrast: Inside a regular translucent surface (
material="auto"), pair inherited primary ink withtone="muted"captions; inside a prominent tinted surface (solid), usetone="inherit"so primary white ink remains legible. - Reduced transparency and increased contrast: When users enable reduced transparency or increased contrast—or when a host opts into
material="opaque"—semantic foreground variables paired withtone="inherit"preserve strong legibility without opacity washout. - Leading, tracking, and selection:
leading="size"keeps each size token’s built-in line box,leading="tighter"maps to1.1, andtracking="tighter"maps to-0.05em. Text never overridesuser-select; wrap with nativeh1,p,label,a, orbuttonelements for document or interactive semantics.
Examples
Section titled “Examples”Optical scale and tighter steps
Section titled “Optical scale and tighter steps”Demonstrates 4xl through xs with leading="tighter", leading="size", and tracking="tighter".
<div class="flex max-w-xl flex-col gap-3">
<h1>
<proto-ui-liquid-glass-text
size="4xl"
font="heading"
weight="bold"
leading="tighter"
tracking="tighter"
>
4xl · Compact Display (leading="tighter")
</proto-ui-liquid-glass-text>
</h1>
<h2>
<proto-ui-liquid-glass-text
size="2xl"
font="heading"
weight="semibold"
leading="tight"
tracking="tight"
>
2xl · Window & Sheet Heading
</proto-ui-liquid-glass-text>
</h2>
<h3>
<proto-ui-liquid-glass-text
size="lg"
font="heading"
weight="semibold"
leading="size"
>
lg · Group Title (leading="size")
</proto-ui-liquid-glass-text>
</h3>
<p>
<proto-ui-liquid-glass-text
size="base"
font="body"
leading="normal"
>
base · System body copy for readable content canvases.
</proto-ui-liquid-glass-text>
</p>
<small>
<proto-ui-liquid-glass-text
size="sm"
font="body"
weight="medium"
leading="size"
>
sm · Control label & toolbar caption
</proto-ui-liquid-glass-text>
</small>
<small>
<proto-ui-liquid-glass-text
size="xs"
tone="muted"
leading="size"
>
xs · Footnote & status timestamp
</proto-ui-liquid-glass-text>
</small>
</div>Content-canvas editorial patterns
Section titled “Content-canvas editorial patterns”Lead copy, italic pull quotes, inline monospace tokens, underlined links, and strikethrough text on the content layer.
<div class="flex max-w-xl flex-col gap-4">
<p>
<proto-ui-liquid-glass-text
size="xl"
tone="muted"
leading="relaxed"
>
Content-layer prose stays unobstructed and selectable beneath
floating Liquid Glass navigation.
</proto-ui-liquid-glass-text>
</p>
<blockquote class="border-s-2 border-border ps-4">
<proto-ui-liquid-glass-text emphasis="italic" leading="relaxed">
"Reserve translucency for controls; keep reading surfaces
calm."
</proto-ui-liquid-glass-text>
</blockquote>
<div class="flex flex-wrap items-center gap-3">
<code class="rounded-md bg-muted px-2 py-0.5">
<proto-ui-liquid-glass-text
size="sm"
font="mono"
weight="medium"
leading="size"
>
LiquidGlassTextRoot
</proto-ui-liquid-glass-text>
</code>
<a href="#api">
<proto-ui-liquid-glass-text
size="sm"
weight="medium"
decoration="underline"
>
Inspect API
</proto-ui-liquid-glass-text>
</a>
<del>
<proto-ui-liquid-glass-text
size="sm"
tone="muted"
decoration="line-through"
>
Legacy blurred copy
</proto-ui-liquid-glass-text>
</del>
</div>
</div>Translucent glass, prominent tint, and opaque canvas
Section titled “Translucent glass, prominent tint, and opaque canvas”Compares crisp text over a single regular glass surface (material="auto"), a prominent tinted surface (solid), and an opaque canvas fallback (material="opaque") over a colorful backdrop.
<div
class="grid max-w-xl grid-cols-1 gap-4 rounded-2xl bg-gradient-to-br from-sky-500/20 via-indigo-500/15 to-fuchsia-500/20 p-6 sm:grid-cols-3"
>
<proto-ui-liquid-glass-surface
variant="outline"
material="auto"
radius="xl"
>
<div class="flex flex-col gap-1 p-4">
<proto-ui-liquid-glass-text
size="sm"
weight="semibold"
tone="inherit"
>
Regular Glass
</proto-ui-liquid-glass-text>
<proto-ui-liquid-glass-text size="xs" tone="muted">
Single glass layer with crisp inherited ink.
</proto-ui-liquid-glass-text>
</div>
</proto-ui-liquid-glass-surface>
<proto-ui-liquid-glass-surface
variant="solid"
radius="xl"
border="none"
>
<div class="flex flex-col gap-1 p-4">
<proto-ui-liquid-glass-text
size="sm"
weight="semibold"
tone="inherit"
>
Prominent Tint
</proto-ui-liquid-glass-text>
<proto-ui-liquid-glass-text size="xs" tone="inherit">
tone="inherit" preserves white primary ink.
</proto-ui-liquid-glass-text>
</div>
</proto-ui-liquid-glass-surface>
<proto-ui-liquid-glass-surface
variant="secondary"
material="opaque"
radius="xl"
>
<div class="flex flex-col gap-1 p-4">
<proto-ui-liquid-glass-text
size="sm"
weight="semibold"
tone="default"
>
Opaque Canvas
</proto-ui-liquid-glass-text>
<proto-ui-liquid-glass-text size="xs" tone="muted">
High-contrast fallback & reading layer.
</proto-ui-liquid-glass-text>
</div>
</proto-ui-liquid-glass-surface>
</div>The following props belong to Root (LiquidGlassTextRoot):
| Prop | Type | Default | Description |
|---|---|---|---|
size | 'xs' 'sm' 'base' 'lg' 'xl' '2xl' '3xl' '4xl' '5xl' | base | Font size scale |
tone | 'default' 'muted' 'inherit' | default | Ink tone; use inherit inside glass or tinted surfaces |
weight | 'normal' 'medium' 'semibold' 'bold' | normal | Font weight |
font | 'body' 'heading' 'mono' | body | System font family stack (no third-party font files bundled) |
leading | 'size' 'tighter' 'tight' 'snug' 'normal' 'relaxed' | normal | Line height; size keeps built-in line boxes and tighter maps to 1.1 |
tracking | 'normal' 'tight' 'tighter' | normal | Letter spacing; tight maps to -0.025em and tighter maps to -0.05em |
emphasis | 'normal' 'italic' | normal | Normal or italic font style |
decoration | 'none' 'underline' 'line-through' | none | Text decoration line |