AZMARA PLATFORM
Guide

Design tokens

Every design token in @azmr/ui, with its light and dark values, the Tailwind utilities that use it, and the contrast it is tested against.

Every colour, radius, motion, elevation, layering and density value in @azmr/ui is a CSS custom property declared in @azmr/ui/tokens.css. This page is generated from that file when the docs are built, so it cannot drift from it.

In the colour tables the swatch shows the light value on the left and the dark value on the right. Colours are OKLCH. The names follow shadcn/ui, so components from any shadcn registry fit alongside ours.

To change a token, override it in your own CSS after the import, for any scope:

:root {
  --primary: oklch(0.55 0.2 260);
}

.dark {
  --primary: oklch(0.75 0.15 260);
}

Shape

TokenValueTailwindNotes
--radius0.625remrounded-sm, rounded-md, rounded-lg, rounded-xl

Surfaces

TokenLightDarkTailwind
--backgroundoklch(1 0 0)oklch(0.145 0 0)bg-background
--foregroundoklch(0.145 0 0)oklch(0.985 0 0)text-foreground
--cardoklch(1 0 0)oklch(0.205 0 0)bg-card
--card-foregroundoklch(0.145 0 0)oklch(0.985 0 0)text-card-foreground
--popoveroklch(1 0 0)oklch(0.205 0 0)bg-popover
--popover-foregroundoklch(0.145 0 0)oklch(0.985 0 0)text-popover-foreground
--scrimoklch(0 0 0 / 0.5)oklch(0 0 0 / 0.65)bg-scrim

Brand and neutrals

TokenLightDarkTailwind
--primaryoklch(0.205 0 0)oklch(0.922 0 0)bg-primary
--primary-foregroundoklch(0.985 0 0)oklch(0.205 0 0)text-primary-foreground
--secondaryoklch(0.97 0 0)oklch(0.269 0 0)bg-secondary
--secondary-foregroundoklch(0.205 0 0)oklch(0.985 0 0)text-secondary-foreground
--mutedoklch(0.97 0 0)oklch(0.269 0 0)bg-muted
--muted-foregroundoklch(0.5 0 0)oklch(0.72 0 0)text-muted-foreground
--accentoklch(0.97 0 0)oklch(0.269 0 0)bg-accent
--accent-foregroundoklch(0.205 0 0)oklch(0.985 0 0)text-accent-foreground

Status

Destructive is shadcn's; success / warning / info are ours.

TokenLightDarkTailwind
--destructiveoklch(0.53 0.22 27)oklch(0.65 0.2 22)bg-destructive
--destructive-foregroundoklch(0.985 0 0)oklch(0.145 0 0)text-destructive-foreground
--successoklch(0.46 0.13 150)oklch(0.72 0.17 150)bg-success
--success-foregroundoklch(0.985 0 0)oklch(0.145 0 0)text-success-foreground
--warningoklch(0.78 0.16 80)oklch(0.82 0.16 82)bg-warning
--warning-foregroundoklch(0.25 0.04 70)oklch(0.25 0.04 70)text-warning-foreground
--warning-textoklch(0.5 0.1 75)oklch(0.82 0.16 82)text-warning-text
--infooklch(0.5 0.18 255)oklch(0.72 0.13 245)bg-info
--info-foregroundoklch(0.985 0 0)oklch(0.145 0 0)text-info-foreground

Lines and focus

--ring keeps >= 3:1 against every surface (WCAG 2.2).

TokenLightDarkTailwind
--borderoklch(0.922 0 0)oklch(1 0 0 / 12%)border-border
--inputoklch(0.922 0 0)oklch(1 0 0 / 16%)border-input
--ringoklch(0.55 0.15 255)oklch(0.72 0.12 255)ring-ring
TokenLightDarkTailwind
--sidebaroklch(0.985 0 0)oklch(0.205 0 0)bg-sidebar
--sidebar-foregroundoklch(0.145 0 0)oklch(0.985 0 0)text-sidebar-foreground
--sidebar-primaryoklch(0.205 0 0)oklch(0.922 0 0)bg-sidebar-primary
--sidebar-primary-foregroundoklch(0.985 0 0)oklch(0.205 0 0)text-sidebar-primary-foreground
--sidebar-accentoklch(0.97 0 0)oklch(0.269 0 0)bg-sidebar-accent
--sidebar-accent-foregroundoklch(0.205 0 0)oklch(0.985 0 0)text-sidebar-accent-foreground
--sidebar-borderoklch(0.922 0 0)oklch(1 0 0 / 12%)border-sidebar-border
--sidebar-ringoklch(0.55 0.15 255)oklch(0.72 0.12 255)ring-sidebar-ring

Categorical chart palette

8 series), tuned for contrast and colour-vision deficiency. Found with a constrained search (>= 3.2:1 on surfaces, inside sRGB, maximising the worst pairwise CIEDE2000 under normal, protan, deutan and tritan vision); tokens.test.ts holds the thresholds.

TokenLightDarkTailwind
--chart-1oklch(0.52 0.19 266)oklch(0.69 0.165 273)bg-chart-1
--chart-2oklch(0.64 0.105 45)oklch(0.8 0.17 73)bg-chart-2
--chart-3oklch(0.58 0.062 173)oklch(0.64 0.152 158)bg-chart-3
--chart-4oklch(0.5 0.189 339)oklch(0.63 0.16 336)bg-chart-4
--chart-5oklch(0.64 0.124 231)oklch(0.86 0.12 204)bg-chart-5
--chart-6oklch(0.64 0.138 107)oklch(0.86 0.104 114)bg-chart-6
--chart-7oklch(0.5 0.19 22)oklch(0.65 0.165 35)bg-chart-7
--chart-8oklch(0.46 0 0)oklch(0.7 0 0)bg-chart-8

Motion

TokenValueTailwindReduced motionNotes
--motion-duration-instant75ms0.01ms
--motion-duration-fast150ms0.01ms
--motion-duration-base200ms0.01ms
--motion-duration-slow300ms0.01ms
--motion-ease-standardcubic-bezier(0.2, 0, 0, 1)ease-standard
--motion-ease-emphasizedcubic-bezier(0.05, 0.7, 0.1, 1)ease-emphasized
--motion-ease-deceleratecubic-bezier(0, 0, 0, 1)ease-decelerate
--motion-ease-acceleratecubic-bezier(0.3, 0, 1, 1)ease-accelerate
--motion-stagger-step40ms0msDelay between items of a staggered list, and the loop length of ambient effects (shimmer).
--motion-duration-ambient1500ms0.01ms

Typography

createTheme({ font }) overrides --font-sans-stack.

TokenValueTailwindNotes
--font-sans-stackui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-seriffont-sans

Elevation

TokenValueTailwindNotes
--elevation-10 1px 2px 0 oklch(0 0 0 / 0.08)shadow-elevation-1
--elevation-20 2px 6px -1px oklch(0 0 0 / 0.12), 0 1px 3px 0 oklch(0 0 0 / 0.08)shadow-elevation-2
--elevation-30 8px 16px -4px oklch(0 0 0 / 0.16), 0 2px 6px -2px oklch(0 0 0 / 0.1)shadow-elevation-3
--elevation-40 20px 32px -8px oklch(0 0 0 / 0.24), 0 8px 12px -4px oklch(0 0 0 / 0.12)shadow-elevation-4

Layering

TokenValueTailwindNotes
--z-dropdown1000
--z-sticky1100
--z-overlay1300
--z-modal1400
--z-popover1500
--z-toast1700
--z-tooltip1800

Density

Comfortable by default.

TokenValueTailwindNotes
--density-control-height2.25rem
--density-control-padding-x0.75rem
--density-gap0.5rem
--density-row-height2.75rem

Density levels

Set data-density="compact" or data-density="spacious" on any element to change the density of everything inside it.

TokenCompactComfortable (default)Spacious
--density-control-height2rem2.25rem2.75rem
--density-control-padding-x0.625rem0.75rem1rem
--density-gap0.375rem0.5rem0.75rem
--density-row-height2.25rem2.75rem3.25rem

Contrast the tests guarantee

The values below are computed from the tokens above with the WCAG 2.x contrast formula. The package's own tests fail if any of them drops below its threshold, so a token change cannot make a component unreadable without a test failing.

Text on its surface (4.5:1)

ForegroundOnLightDark
--foreground--background19.79:1 (pass)18.96:1 (pass)
--card-foreground--card19.79:1 (pass)17.16:1 (pass)
--popover-foreground--popover19.79:1 (pass)17.16:1 (pass)
--primary-foreground--primary17.16:1 (pass)14.22:1 (pass)
--secondary-foreground--secondary16.42:1 (pass)14.48:1 (pass)
--muted-foreground--muted5.50:1 (pass)6.09:1 (pass)
--accent-foreground--accent16.42:1 (pass)14.48:1 (pass)
--destructive-foreground--destructive5.67:1 (pass)5.56:1 (pass)
--success-foreground--success6.43:1 (pass)8.54:1 (pass)
--warning-foreground--warning7.90:1 (pass)9.09:1 (pass)
--info-foreground--info5.86:1 (pass)8.07:1 (pass)
--sidebar-foreground--sidebar18.96:1 (pass)17.16:1 (pass)
--sidebar-primary-foreground--sidebar-primary17.16:1 (pass)14.22:1 (pass)
--sidebar-accent-foreground--sidebar-accent16.42:1 (pass)14.48:1 (pass)
--muted-foreground--background6.00:1 (pass)7.98:1 (pass)

Status colours as text on the page and on cards (4.5:1)

--warning is a yellow surface colour, so text in the warning tone uses --warning-text.

ForegroundOnLightDark
--destructive--background5.92:1 (pass)5.56:1 (pass)
--destructive--card5.92:1 (pass)5.03:1 (pass)
--success--background6.71:1 (pass)8.54:1 (pass)
--success--card6.71:1 (pass)7.72:1 (pass)
--warning-text--background6.11:1 (pass)11.18:1 (pass)
--warning-text--card6.11:1 (pass)10.12:1 (pass)
--info--background6.12:1 (pass)8.07:1 (pass)
--info--card6.12:1 (pass)7.30:1 (pass)

Focus ring (3:1)

ForegroundOnLightDark
--ring--background4.89:1 (pass)7.98:1 (pass)
--ring--card4.89:1 (pass)7.22:1 (pass)
--ring--popover4.89:1 (pass)7.22:1 (pass)

Chart series on the page and on cards (3:1)

The eight chart colours are also tested to stay distinguishable from each other under normal vision, protanopia, deuteranopia and tritanopia.

ForegroundOnLightDark
--chart-1--background5.76:1 (pass)6.91:1 (pass)
--chart-1--card5.76:1 (pass)6.26:1 (pass)
--chart-2--background3.49:1 (pass)10.31:1 (pass)
--chart-2--card3.49:1 (pass)9.33:1 (pass)
--chart-3--background4.15:1 (pass)6.31:1 (pass)
--chart-3--card4.15:1 (pass)5.71:1 (pass)
--chart-4--background6.68:1 (pass)5.21:1 (pass)
--chart-4--card6.68:1 (pass)4.71:1 (pass)
--chart-5--background3.28:1 (pass)13.48:1 (pass)
--chart-5--card3.28:1 (pass)12.20:1 (pass)
--chart-6--background3.31:1 (pass)13.16:1 (pass)
--chart-6--card3.31:1 (pass)11.91:1 (pass)
--chart-7--background6.64:1 (pass)5.70:1 (pass)
--chart-7--card6.64:1 (pass)5.16:1 (pass)
--chart-8--background7.13:1 (pass)7.41:1 (pass)
--chart-8--card7.13:1 (pass)6.70:1 (pass)

On this page