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

Dialog, ConfirmDialog & Feedback

Accessible modal Dialog (Escape close, focus restoration, dirty-form backdrop lock), destructive ConfirmDialog, Alert, solid Skeleton, EmptyState, and LoadFailed.

Interactive Playground

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

Token audit cleanAll 97 light and dark pairs clear WCAG 2.1 AA with zero failures.
Unable to load dataUnable to reach preview endpoint. Click Retry to test recovery state.

No deprecated tokens

Every token in v0.1.0 is active. Click below to test the EmptyState call-to-action.

@hahlex/millar-ui
import { ConfirmDialog } from "@hahlex/millar-ui";

<ConfirmDialog
  open={confirmOpen}
  onClose={() => setConfirmOpen(false)}
  onConfirm={handleDelete}
  title="Archive workspace"
  message="Archived workspaces stop serving tokens immediately."
  tone="danger"
/>

Props API

Dialog, ConfirmDialog & Feedback component props
PropTypeDefaultDescription
openboolean-Controls modal visibility.
onClose() => void-Dismiss callback.
titlestring-Accessible dialog title bound via aria-labelledby.
dirtybooleanfalsePrevents accidental backdrop click dismissal when form has unsaved edits.

Usage Guidelines & Agent Guardrails

When to use
  • Tasks requiring protected focus or explicit confirmation before irreversible change.
Responsive behavior

Max 85dvh centered modal on desktop; compact padded modal on phone screens.

Anti-Hallucination Guardrails (AI & Human)
  • Never open a destructive action without ConfirmDialog tone='danger'.
  • Never use gradient shimmer on Skeleton; use solid --bg-surface-2 fills.

Accessibility & Keyboard Contract

role='dialog' aria-modal='true' aria-labelledbyrole='alert' on error Alerts and LoadFailedRestores focus to trigger element on close
Keyboard interactions
KeyBehavior
EscapeCloses dialog and restores focus.
TabNavigates controls inside dialog.