Skip to main content
HahlexMillarv0.1.0 Draft
ComponentsDraftWCAG 2.1/2.2 AAZero Gradients@hahlex/millar-ui

Input & Form Controls

Accessible Input, TextArea, Select, Switch, Checkbox, ChoiceToggle, and HelpTooltip controls with 2px visible focus rings, decoupled help hints, and role='alert' validation errors.

Interactive Playground

Live component specimen driven directly by Millar tokens in Light and Dark mode.

Simulate validation error (role='alert')
Enforce zero em-dash
Live state: workspace="Hahlex Studio" · register=product · emDashGuard=true · signOff=true
@hahlex/millar-ui
import { Input } from "@hahlex/millar-ui";

<Input
  label="Workspace slug"
  hint="Used in permanent API URLs."
  placeholder="hahlex-studio"
  error={slugError}
/>

Props API

Input & Form Controls component props
PropTypeDefaultDescription
labelstring-Programmatically bound via <label htmlFor>.
hintstring-Optional 1-2 sentence explanation rendered in a click/hover/focus HelpTooltip outside <label>.
errorstring-Validation message linked via aria-describedby and announced via role='alert'.

Usage Guidelines & Agent Guardrails

When to use
  • All operational forms, filters, settings, and inline editors.
Responsive behavior

Full-width fluid inputs at 40px height; HelpTooltip supports click/tap on touch devices with >= 24x24px target.

Anti-Hallucination Guardrails (AI & Human)
  • Never rely on placeholder text as a substitute for label.
  • Never suppress focus outline with outline: none without replacing with .millar-focus.
  • In ChoiceToggle / checked pills on --accent-soft, ALWAYS use --fg-on-accent-soft (#362218), NEVER --fg-accent.

Accessibility & Keyboard Contract

aria-invalid when error is setaria-describedby pointing to role='alert' error paragraphrole='switch' with aria-checked on Switch
Keyboard interactions
KeyBehavior
TabMoves focus sequentially with visible 2px .millar-focus ring.
Space / EnterToggles Switch, Checkbox, ChoiceToggle, or HelpTooltip.
EscapeDismisses active HelpTooltip.