ComponentsDraftWCAG 2.1/2.2 AAZero Gradients
@hahlex/millar-uiChoiceToggle
High-contrast option switch (e.g., Light/Dark or EN/VI) pairing --accent-soft with --fg-on-accent-soft (7.69:1 AAA across both themes).
Interactive Playground
Live component specimen driven directly by Millar tokens in Light and Dark mode.
Selected value: light
LIGHTActive option uses --accent-soft + --fg-on-accent-soft (7.69:1 AAA), eliminating the 1.00:1 dark-mode invisible text bug.
Props API
Usage Guidelines & Agent Guardrails
When to use
- Compact binary or ternary preferences (Theme, Locale, Register, Viewport).
Compact inline control with 30px internal buttons inside a 38px bordered tray.
Anti-Hallucination Guardrails (AI & Human)
- Never style active state with --fg-accent on --accent-soft (1.00:1 invisible in dark mode).
Accessibility & Keyboard Contract
role='group' with aria-labelaria-pressed on each option button