Installation
- Tab Title
- Tab Title
Usage
Examples
Sizes
Four sizes available:s, m (default), l, xl.
Sortable Columns
Add sorting withsortDirection and onSort props.
Row Selection
UseTableCheckboxCell for selectable rows.
Specialized Cells
Text Cell
Display text with optional prefix, suffix, and additional info.Number Cell
Right-aligned cell for numeric data with tabular nums.Badge Cell
Display status badges with consistent width.Avatar Group Cell
Show multiple user avatars.Progress Cell
Display progress indicators.Actions Cell
Right-aligned actions with buttons.Fixed Layout
UsefixedLayout for tables with explicit column widths.
API Reference
Table.Root
Size of the table:
s, m, l, xl. Affects row height and cell padding.Use CSS
table-layout: fixed. Columns with explicit widths stay fixed.Table.Header
Standard<thead> element with consistent border styling.
Table.Body
Standard<tbody> element.
Table.Footer
Standard<tfoot> element with background and border.
Table.Row
Highlights row with background and left border indicator.
When
true, disables hover effects for header rows.Table.Head
Current sort direction. Shows sort icon when provided.
Click handler for sorting. Makes column sortable with interactive button.
Text alignment:
left, right.Table.Cell
Basic table cell. Use specialized cell components for common patterns.Table.CheckboxCell
Checkbox state.
Callback when checkbox changes.
Show indeterminate state (for “select all” checkboxes).
Table.TextCell
Primary text content.
Secondary text. Stacks below on large sizes, inline with dot separator on small.
Icon or element before text.
Icon or element after text.
Use medium font weight for primary text.
Table.NumberCell
Numeric content. Automatically right-aligned with tabular nums.
Table.BadgeCell
Badge variant.
Badge emphasis.
Alignment:
left, right.Fixed width to prevent column resizing.
Table.AvatarGroupCell
Array of avatar data.
Maximum avatars to show before overflow.
Table.ProgressCell
Progress value (0-100).
Progress tone:
default, success, warning, danger.Table.ActionsCell
Action buttons or custom content. Defaults to “View” link and more menu.
Table.Icon
Icon color tone:
default, success, warning, danger, info.Table.Prefix
Context-aware prefix component (checkbox, icon, avatar) that adapts to table size.Accessibility
- Uses semantic HTML table elements
- Sortable columns have proper
aria-sortattributes - Checkbox cells are clickable with keyboard support
- Row selection indicated with
data-selectedattribute - Focus management for interactive elements
Design Tokens
Table uses design tokens for consistent styling:- Spacing:
--space-*for row heights, cell padding, gaps - Border radius:
--radius-4,--radius-8,--radius-max - Colors:
--color-border-*,--color-surface-*,--color-content-*,--color-actions-primary-default(selection indicator) - Typography:
--font-size-*,--line-height-*,--font-weight-medium