token-specimen

Unified design token scale display. Renders shadows, radii, borders, colors, or sizes based on the type attribute.

Overview

A single component for displaying any design token scale. The type attribute controls the visual rendering while sharing the same core API across all token categories.

Part of the Design System Pack.

Types

Shadow

Cards with applied box-shadow at each elevation step.

Radius

Squares with applied border-radius at each scale step.

Border

Lines at each border width.

Color

Swatches for color tokens.

Size

Horizontal bars showing spacing values (same visualization as <spacing-specimen>).

Custom Tokens

Override tokens and prefix to display any set of CSS custom properties.

Attributes

AttributeValuesDefaultDescription
type"shadow", "radius", "border", "color", "size"Token type to display
tokensstringComma-separated token names (defaults vary by type)
prefixstringCSS variable prefix (auto-set from type if omitted)
show-valuesbooleantrueShow computed token values
labelstringOptional heading label