Use for token maps, prop references, and side-by-side guidance.
Table
CSS grid layout for structured data: token references, component props, usage guidelines, and comparison rows.
- .source-table Container and border shell
- .source-table-head Header row and labels
- .source-table-row Data rows
- .source-table-cell-mono Token or code values
- .source-table-cell-muted Supporting descriptions
States
--source-color-background on the hovered row.
Design intent
Table presents structured data in a scannable grid. The component uses CSS grid, not an HTML table element, so column widths are fully flexible. Use it when rows share a fixed set of attributes and comparison across rows is the primary task.
Column layout
Set --table-cols on the container. It maps directly to grid-template-columns.
Cell classes
.source-table to wrap long value strings instead of clipping them on one line.
When to use
Use custom table columns when documentation needs flexible widths.
Combine labels, defaults, and examples in one readable grid.
Do not use this for sortable/exportable datasets. Use semantic HTML tables.
Avoid this component where assistive tech must parse true tabular relationships.
Designer checklist
- Column headers are short and describe the data type, not the data value.
- Sortable columns communicate the current sort direction visually and in text.
- Numeric columns are right-aligned for scannable comparison.
- Empty state is handled. Do not show an empty grid with only headers.
HTML structure
<div class="source-table source-table-wrap" style="--table-cols: 1fr 1fr">
<div class="source-table-head">
<span>Prop</span>
<span>Default</span>
</div>
<div class="source-table-row">
<span class="source-table-cell source-table-cell-mono">variant</span>
<span class="source-table-cell source-table-cell-muted">primary</span>
</div>
</div>
Component tokens
CSS grid, not HTML table
The component uses CSS grid rather than an HTML <table>. This allows arbitrary column counts and mixed cell types without the constraints of table display. The trade-off is that screen readers will not announce row and column relationships.
For purely visual reference content like token docs and prop lists, this is acceptable. For data users need to navigate, compare, or copy as a data set, use a semantic <table> instead.