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

Card

Single-elevation structural surface (base, inset, or raised) with 1px warm-sand border and canonical 16px/18px interior padding.

Interactive Playground

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

Live Interactive Cardbase · default
Default --bg-surface with 1px hairline border and zero drop shadow.
@hahlex/millar-ui
import { Card } from "@hahlex/millar-ui";

<Card surface="base">
  <h3>Workspace health</h3>
  <p>All token contrast gates passed.</p>
</Card>

Props API

Card component props
PropTypeDefaultDescription
surface"base" | "inset" | "raised""base"Selects Surface Role fill and border/shadow pairing.
padding"default" | "compact" | "none""default"Interior padding preset.

Usage Guidelines & Agent Guardrails

When to use
  • Grouping related metrics, settings panels, or record detail facets.
Responsive behavior

Fluid block container with consistent padding across breakpoints.

Anti-Hallucination Guardrails (AI & Human)
  • Never nest Cards inside Cards.
  • Never wrap a primary page DataTable inside an extra outer Card.
  • Never attach a one-sided thick accent border down the side of a rounded Card.

Accessibility & Keyboard Contract

Plain container; nest semantic headings and buttons inside rather than making the entire div a fake button.
Keyboard interactions
KeyBehavior
TabFocuses interactive elements inside the card directly.