Tokens
Every value a component reads is a CSS custom property with the --pl- prefix. tailwind.css maps them to Tailwind utilities, and Tailwind's own palette and radius scale are removed, so a raw colour such as bg-blue-500 does not exist.
Colours
Semantic colours live in --pl-color-<name> and are used through utilities such as bg-surface or text-fg-muted.
| Group | Names |
|---|---|
| Grounds | bg, bg-subtle (panels, sidebars), surface (cards, inputs), bg-soft (tracks, insets), bg-hover, bg-selected |
| Lines | border-subtle (row separators), border, border-strong, border-control (button and field outlines) |
| Text | fg, fg-muted, fg-subtle, fg-faint (decorative only) |
| Accent | accent, accent-hover, accent-fg, accent-subtle, accent-subtle-fg, focus |
| Status | danger, danger-hover, danger-fg, danger-subtle, danger-subtle-fg, warning, warning-subtle, warning-subtle-fg, success, success-subtle, success-subtle-fg |
| Overlay | overlay |
Eight tones for categories and avatars, indigo, blue, green, amber, rose, violet, teal and gray, each have five parts: soft, soft-fg, dot, avatar and avatar-fg (bg-amber-soft text-amber-soft-fg, bg-teal-dot). The indigo tone takes the hue of the accent.
Radius
| Utility | Step | Default |
|---|---|---|
rounded-xs | xs | 4px |
rounded-sm | sm | 6px |
rounded-md | md | 8px |
rounded-lg | lg | 10px |
rounded-xl | xl | 12px |
rounded-2xl | 2xl | 14px |
rounded-3xl | 3xl | 18px |
Semantic radii come first in components: rounded-control (buttons, 8px), rounded-field (inputs, 10px), rounded-surface (cards, 12px), rounded-panel (panels, 14px), rounded-dialog (dialogs and big cards, 18px), rounded-avatar, and rounded-full for pills, badges and dots. All of them scale with the theme's radius option.
Every rounded-* utility also sets corner-shape, so corners are superellipses where the browser supports them. An arbitrary radius needs a corner-* utility next to it, for example rounded-[22px] corner-dialog. See corners and the radius fit.
Type
| Utility | Size | Use |
|---|---|---|
text-2xs | 11px | captions |
text-xs | 12px | metadata |
text-sm | 13px | base UI text |
text-base | 14px | base UI text |
text-md | 15px | reading text |
text-lg | 17px | |
text-xl … text-5xl | 20, 22, 26, 30, 34px | headings |
text-6xl … text-8xl | 48, 60, 76px | landing pages |
Line height and letter spacing come with each size and are multiplied by per-language factors (see Fonts and scripts). Use tracking-caption, tracking-wide, tracking-code, tracking-tight and tracking-tighter instead of arbitrary letter spacing. Font families are font-sans, font-mono, font-serif and font-display.
Spacing
Tailwind's --spacing is var(--pl-space-unit): 0.25rem by default, 0.225rem with density: 'compact' and 0.28rem with 'comfortable'. Sizes stay on the 4px grid in the default density.
Elevation and motion
shadow-raisedfor raised thumbs and selected segments,shadow-overlayfor menus, popovers, dialogs and toasts.elevation: 'flat'sets both tonone.- Durations
duration-fast-01(70ms),fast-02(110ms),moderate-01(150ms),moderate-02(240ms),slow-01(400ms) and easingsease-productive,ease-productive-exit,ease-expressive,ease-expressive-exit. Durations drop to0msunderprefers-reduced-motion: reduceand underdata-motion="reduced".
In TypeScript
@peleda-app/tokens also exports the scales as values: fontSize, fontWeight, space, ease, duration, transition and cssCubicBezier, plus font with the family variables. colorVar('accent') returns var(--pl-color-accent).