THEME
MOTION
HAPTIC
SOUND

TABLE

Terminal-style tabular display. Controlled sort via onSortChange; optional row-click with keyboard support.

Live demo

Import

import { Table } from '@cathode-ui/react';

Props

Name Type Default Required Description
columns TableColumn[] yes
rows T[] yes
sortBy string
sortDir 'asc'|'desc' asc
onSortChange (key, dir) => void Emitted when a sortable header is clicked. Consumer supplies sorted rows.
onRowClick (row, i) => void Makes each row focusable + Enter/Space activatable.
caption string
showCaption boolean false Visually show the caption above the table.
emptyText string NO DATA

Examples

basic

<Table columns={cols} rows={rows} />

sortable

<Table columns={cols} rows={sortedRows} sortBy="name" sortDir="asc" onSortChange={handleSort} />

Accessibility

Role: table

Feedback

Hapticnone
Soundnone

← All components