Type scalePro
Oxyn original: Sans, Serif or Mono, A− / A+ around a stepped size slider and three line spacings, on a reading sample that counts its line length.
oxyn add type-scaleAfter hours
Evening reading should feel easy. Pick a family, nudge the size until a line sits comfortably under your eye, and give the lines a little room to breathe.
16 px · 1.5 lines · about 63 characters a line, comfortable
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Set how text reads – family, size and line spacing – on a real paragraph, with a hint about line length.
When not to use
- Picture tiles we draw ourselves plus Your own, with Film, Static or Dither laid over the picture and a home screen preview: use Background picker instead.
- Eight mini-window swatches: use Theme grid instead.
- Oxyn original: use Theme split instead.
Installation
Type scale is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add type-scaleUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
Sans at 16 px with normal spacing.
After hours
Evening reading should feel easy. Pick a family, nudge the size until a line sits comfortably under your eye, and give the lines a little room to breathe.
16 px · 1.5 lines · about 63 characters a line, comfortable
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Serif relaxed
Serif at 18 px with relaxed lines: a reading view.
After hours
Evening reading should feel easy. Pick a family, nudge the size until a line sits comfortably under your eye, and give the lines a little room to breathe.
18 px · 1.75 lines · about 60 characters a line, comfortable
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Mono tight
Mono at 14 px, tight: a code-first setting.
After hours
Evening reading should feel easy. Pick a family, nudge the size until a line sits comfortably under your eye, and give the lines a little room to breathe.
14 px · 1.3 lines · about 62 characters a line, comfortable
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
TypeScale
| Prop | Type | Default | Description |
|---|---|---|---|
default_family | String | "sans" | Starting family (`sans`, `serif`, `mono`). |
default_step | usize | 3 | Starting size step (0–5: 13, 14, 15, 16, 18, 20 px). |
default_spacing | String | "normal" | Starting spacing (`tight`, `normal`, `relaxed`). |
measure_width | f64 | 520.0 | Width the line count is worked out for, in px. |
on_change | EventHandler<(String, u32, f64)> | — | Any choice changed: (family, px, line height). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Family, A−, the size slider, A+, spacing |
| LeftorRight on the slider | One size step |
| EnterorSpace | Picks a family or spacing, or steps the size |
Accessibility
- Family and spacing are radio groups; each family name is set in its own face.
- A− and A+ are named Smaller text and Larger text and disable at the ends; the slider says its size in px.
- The readout under the sample is a polite live region with size, spacing and line length.
Responsive behaviour
- 560 px card; controls stack under 480 px.
Edge cases (spec)
Controls stack under 480 px.
Notes for AI
- Import
TypeScalefromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
TypeScaleElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.