Skip to content

Tables ​

Data tables for displaying structured information. All tables meet WCAG 2.1 Level AA with proper semantics and keyboard navigation.

Basic Table ​

NameEmailRoleStatus
John Doejohn@example.comAdminActive
Jane Smithjane@example.comEditorActive
Bob Wilsonbob@example.comViewerPending
Alice Brownalice@example.comEditorInactive

Striped Table ​

ProductCategoryPriceStock
Widget AElectronics$29.99150
Widget BElectronics$49.9975
Gadget XAccessories$19.99200
Gadget YAccessories$24.99120

Table with Hover ​

DateDescriptionAmountType
2025-01-15Payment received+$1,250.00Credit
2025-01-14Service fee-$25.00Debit
2025-01-12Subscription-$99.00Debit
2025-01-10Refund+$50.00Credit

Compact Table ​

IDTaskPriorityDue
#001Update documentationHighToday
#002Review pull requestMediumTomorrow
#003Fix bug in authHighToday
#004Add unit testsLowNext week

Token Mapping ​

How tokens flow through the three-layer system: value → primitive → semantic → component.

Container bg
#18181b33→zinc-900/20→--card→--table-bg
Container border
#27272a99→zinc-800/60→--border→--table-border
Header bg
#18181b80→zinc-900/50→--secondary→--table-header-bg
Header text
#71717a→zinc-500→--muted-foreground→--table-header-text
Row border
#27272a66→zinc-800/40→--border→--table-row-border
Row hover
#27272a66→zinc-800/40→--accent→--table-row-hover
Cell text
#d4d4d8→zinc-300→--foreground→--table-cell-text
PrimitiveSemanticComponent

Accessibility Guidelines ​

✓
Proper SemanticsUse thead, tbody, th, and td elements correctly.
✓
Header ScopeTable headers have scope="col" or scope="row" attributes.
✓
Keyboard NavigationInteractive elements within cells are keyboard accessible.
✓
Caption/SummaryComplex tables include caption or aria-describedby for context.