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

DataTable & FilterBar

Zero-scrollbar semantic DataTable with '-' empty cells, tabular numeric alignment, and mobileCard mode, paired with immediate-apply FilterBar.

Interactive Playground

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

Preview mobileCard mode (< 640px)
Zero-scrollbar specimen table (empty cells render '-')
PackageLifecycleNotesTestsInspect
@hahlex/millar-tokensApproved-8 / 8
@hahlex/millar-uiApproved-8 / 8
@hahlex/millar-marketingDraft-5 / 5
@hahlex/millar-mcpDraftstdio + HTTP4 / 4
Selected package: @hahlex/millar-tokensLifecycle: Approved · Tests passing: 8 / 8 · Matching rows: 4
@hahlex/millar-ui
import { DataTable } from "@hahlex/millar-ui";

<DataTable caption="Token inventory" columns={columns} rows={rows} rowKey={(r) => r.id} />

Props API

DataTable & FilterBar component props
PropTypeDefaultDescription
columnsDataTableColumn<T>[]-Column schema with optional numeric alignment and custom cell renderer.
rowsT[]-Dataset rows for the current page.
mobileCard(row: T) => ReactNode-Card layout rendered for compact phone viewports (< 640px).

Usage Guidelines & Agent Guardrails

When to use
  • Directories, token explorers, audit logs, and structured operational records.
Responsive behavior

Fixed-layout zero-scrollbar table on desktop/tablet; switches to mobileCard list below 640px.

Anti-Hallucination Guardrails (AI & Human)
  • Never add horizontal or vertical inner scrollbars to primary page DataTables; fit columns and paginate.
  • Never render U+2014 em-dash in empty table cells; render '-'.

Accessibility & Keyboard Contract

Semantic <table>, <caption>, <th scope='col'>, tabular-nums on numeric columns
Keyboard interactions
KeyBehavior
TabMoves through FilterBar controls, active filter pill dismiss buttons, and row actions.