type-specimen
Typography specimen web component with character grid, weight scale, type scale, and editable sample text.
Overview
The <type-specimen> component displays a font specimen for exploring typefaces. It renders an editable sample, a character grid, a weight scale, and the VB 9-step type scale.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
font-family |
string | system-ui |
CSS font-family value. |
label |
string | Derived from font-family | Display name for the font. |
sample |
string | The quick brown fox… | Custom sample text. |
show-scale |
boolean | — | Show VB type scale (xs–5xl). |
show-weights |
boolean | — | Show weight scale with “Aa” samples. |
show-characters |
boolean | — | Show uppercase, lowercase, digit, and punctuation grids. |
weights |
string | 300,400,500,600,700 |
Comma-separated font weights to display in the weight scale. |
Features
Character Grid
Shows uppercase, lowercase, digits, and punctuation in the specified font.
Weight Scale
Renders “Aa” at each specified weight for quick comparison.
VB Type Scale
Displays the 9-step VB type scale from xs to 5xl.
Editable Sample
The large sample text is contenteditable — click it and type your own text to preview the font.
Full Specimen
Enable all features at once for a comprehensive view.
Custom Sample Text
Accessibility
- The sample text uses
contenteditable="plaintext-only"withspellcheck="false"to avoid intrusive browser features. - All sections use semantic markup for screen reader navigation.
Related
- Fluid Scaling — the VB type scale system
- Type Explorer — font pairing tool using this component