Skip to content

Table

Table

<Table aria-label="Users" selectionMode="multiple">
<TableHeader>
<Column id="name" isRowHeader>Name</Column>
<Column id="role">Role</Column>
<Column id="status">Status</Column>
</TableHeader>
<TableBody>
<Row>
<Cell>Alice</Cell>
<Cell>Owner</Cell>
<Cell>Active</Cell>
</Row>
</TableBody>
</Table>

Install: @helixui/core

import { Table, TableHeader, TableBody, Row, Column, Cell } from '@helixui/core'

status: stable · since: 0.1.0

Tags: grid, rows, columns, sortable, selectable

Anatomy

┌─ Header Header Header ─┐
├──────────────────────────┤
│ cell cell cell │
│ cell cell cell │
│ cell cell cell │
└──────────────────────────┘

Layout

  • displayblock
  • widthfill
  • heightcontent
  • intrinsicSizefills width, scrolls horizontally on overflow
  • stackablefalse
  • fullBleedfalse

Visual

A row × column grid with a sticky header, hairline row dividers, and zebra hover. Sortable columns show a chevron when active. Selectable rows show a leading checkbox column.

Props

NameTypeDefaultDescription
selectionMode'none' | 'single' | 'multiple'noneRow selection mode.
selectionBehavior'replace' | 'toggle'replaceHow rows are selected.
sortDescriptorSortDescriptorControlled sort state.
onSortChange(d: SortDescriptor) => voidSort change handler.

Slots

  • Table children — TableHeader + TableBody
  • Column children — header label
  • Cell children — cell content

Tokens used

color.bg.surface.subtle, color.bg.action.brand.subtle, color.border.default, color.border.focus, color.text.primary, color.text.secondary, space.3, space.4, font.family.sans, font.size.sm, font.size.xs, font.weight.semibold

Accessibility

Role: grid

Keyboard

KeyAction
ArrowKeysMove focus between cells.
SpaceToggle row selection.
Cmd/Ctrl+ASelect all (when selectionMode=multiple).

Composes with

ComponentRelationNote
FloatingBarsiblingUse over a Table when rows are selected.
PaginationsiblingBelow the Table.
EmptyStatealternativeWhen no rows.

Prompt examples

These are the AI prompt → JSX mappings used by the helixui prompt DSL and integrations like Cursor / Claude Code.

sortable user table

“three-column table with sort and selection”

<Table selectionMode="multiple" onSortChange={setSort}>
<TableHeader>
<Column id="name" allowsSorting>Name</Column>
<Column id="email">Email</Column>
<Column id="role">Role</Column>
</TableHeader>
<TableBody>
{rows.map(r => (
<Row key={r.id}><Cell>{r.name}</Cell><Cell>{r.email}</Cell><Cell>{r.role}</Cell></Row>
))}
</TableBody>
</Table>