Headless tabular data with sorting, filtering, selection,
pagination, column pinning, sizing and row-detail disclosure
panels — wrapped by an eidos visual recipe (variant / size /
color / striped / sticky header). Use Table for
flat data; reach for TreeGrid when rows are
hierarchical, or GridList when rows carry inline
interactive children.
Soma owns sort / filter / select / paginate / pin / row-detail state and ARIA wiring.
Eidos adds visual chrome (variant / size / color), striping, hover feedback and the optional sticky header + scroll region.
`dir` and `locale` are demo-driven for verification — Table forwards `dir` to the soma Provider and `locale` is used by the demo for date formatting.
soma i18n
soma feature controls
eidos visual props
eidosvisual · createTable + Table compoundsvelte
{eidosSnippet}
{/if}
{#if tab === 'api'}
API reference
9 soma parts (Provider · Header · Body · Footer · ColumnHeader · Row · Cell · RowDetail · RowDetailTrigger) plus the eidos-only SortButton ergonomic helper. The table instance carries every imperative method (toggleSort, setGlobalFilter, toggleRowSelection, pinColumn, setPageIndex, toggleRowDetail…).
Provider (Table)
Prop
Type
Default
Description
table
TableInstance
required
Returned by createTable.
label
string
'Data table'
Accessible name. Translated.
dir soma
'ltr' | 'rtl'
from Soma prefs
Text direction.
variant eidos
'surface' | 'outline' | 'ghost'
'surface'
Container chrome.
size eidos
'xs' | 'sm' | 'md' | 'lg' | 'xl'
'md'
Row height + cell padding + font.
color eidos
ColorRole
'primary'
Accent for selected rows + sort indicator + focus.
block eidos
boolean
true
Stretch root to container inline-size.
striped eidos
boolean
false
Alternate-row tint (skipped in ghost variant).
hoverable eidos
boolean
true
Highlight rows on hover.
stickyHeader eidos
boolean
false
Pins <thead> to the top of the scroll region.
maxHeight eidos
string
—
Wraps the table in a scrolling region with the given CSS block-size.
stableRows eidos
number
—
Reserve vertical space for N rows + header. Keeps the wrapper height steady so pagination/footer don't jump when filters change row count. Ignored when maxHeight is set.
{#each events as action (action.name)}
{@const sem = action.semantic}
{@const intentDecl = 'intent' in sem ? sem.intent : undefined}
{@const intentStr = typeof intentDecl === 'string' ? intentDecl : intentDecl ? `fromProp:${(intentDecl as { fromProp?: string }).fromProp ?? '?'}` : '—'}
{action.name}
{sem.family}
{sem.verb ?? '—'}
{sem.sequence ?? 'pre'}
{intentStr}
{action.target}
{/each}
{/if}
{#if tab === 'sema'}
sema
· events
Soma raises shift-sort on column-header click,
commit-select on row toggle and
shift-expand-row when the detail panel toggles.
Use Play to replay each event against the first match in the stage.
Selectors at src/uix/eidos/components/table/table.css. The visual data-attrs (data-size, data-variant, data-color, data-block, data-striped, data-hoverable, data-sticky-header, data-scrollable) live on the <div data-table-root> wrapper so the semantic <table> stays clean.
Emits a native <table> with aria-label and per-column aria-sort. Rows expose aria-rowindex + aria-selected (when selection is enabled). Detail panels are wired with aria-expanded + aria-controls. Use TreeGrid for true hierarchical rows (arrow-key navigation) — Table is for flat tabular data only.
Keyboard
Key
Action
Tab
Move focus through sort buttons, selectable rows, detail triggers, pagination.
Enter / Space on row
Toggle selection (when selectionMode ≠ 'none').
Enter / Space on RowDetailTrigger
Open / close the row's detail panel.
Click on sort button
Cycle asc → desc → none.
Shift+Click on sort button
Add column to multi-sort (when sorting.multi: true).