Skip to catalog content
Mado UI Open-code components

Source-owned · zero runtime dependencies

foundation · theme

Mado UI theme

Semantic light, dark and forced-colors design tokens.

Install with npx @madojs/ui@latest add theme.

Mado UI theme

Semantic OKLCH tokens adapt to light, dark and forced-colors preferences without prescribing application-specific states.

Canvas
--mado-ui-color-canvas
Surface
--mado-ui-color-surface
Text
--mado-ui-color-text
Action
--mado-ui-color-action

Composition

  • Import the theme once, place data-mado-ui-theme on an application-owned root, and let copied recipes consume the semantic color, spacing, radius, shadow and focus tokens.
  • Light is the default token set; dark is an explicit value and forced-colors replaces authored colors with browser system colors.

Public API

attribute data-mado-ui-theme
Selects the light or dark semantic token set on the containing application root.
css-property --mado-ui-color-*
Semantic canvas, surface, text, border, action and status color tokens authored in OKLCH.
css-property --mado-ui-space-*
Shared spacing scale used as a fallback by primitives, blocks and templates.
css-property --mado-ui-focus-ring
Shared visible focus-ring shadow; forced-colors recipes replace it with system outlines.

Detected public CSS properties

  • --mado-ui-color-action
  • --mado-ui-color-action-contrast
  • --mado-ui-color-action-hover
  • --mado-ui-color-border
  • --mado-ui-color-canvas
  • --mado-ui-color-danger
  • --mado-ui-color-danger-contrast
  • --mado-ui-color-danger-hover
  • --mado-ui-color-danger-soft
  • --mado-ui-color-danger-text
  • --mado-ui-color-info-soft
  • --mado-ui-color-info-text
  • --mado-ui-color-neutral-soft
  • --mado-ui-color-neutral-text
  • --mado-ui-color-success-soft
  • --mado-ui-color-success-text
  • --mado-ui-color-surface
  • --mado-ui-color-surface-soft
  • --mado-ui-color-text
  • --mado-ui-color-text-muted
  • --mado-ui-color-warning-soft
  • --mado-ui-color-warning-text
  • --mado-ui-focus-ring
  • --mado-ui-radius-full
  • --mado-ui-radius-md
  • --mado-ui-radius-sm
  • --mado-ui-shadow-panel
  • --mado-ui-space-1
  • --mado-ui-space-2
  • --mado-ui-space-3
  • --mado-ui-space-4
  • --mado-ui-space-5
  • --mado-ui-space-6
  • --mado-ui-space-7
  • --mado-ui-space-8

Accessibility contract

  • The theme changes presentation only: document semantics, accessible names and state remain owned by the rendered HTML.
  • Forced-colors rules preserve system color choices instead of forcing OKLCH values over user preferences.

Keyboard

  • The recipe adds no composite keyboard model; native interactive descendants keep their browser-defined keys and Tab order.

Focus

  • The theme supplies a shared focus token but never moves focus or makes a non-interactive element focusable.

Fallback

  • Without the theme, every dependent recipe retains local fallback values and the native document remains usable.

Installation graph

Direct dependencies

None. This item is standalone.

Resolved install order

None. This item is standalone.

Copied source

The CLI resolves each registry source path into the configured project target. Links below point to the exact catalog build tag.