Talisman LogoTalisman Logo Design System
Browse documentation
Components

Table

Shows records with the same columns in rows, with density control, a sticky header and row states, built on a native HTML table.

Stableimport { Table } from "@repo/ui/table";Source
TarefaNúmero do processoClienteRevisorPrazoStatus
Revisar contestação0001234-56.2026.8.26.0100Banco AuroraRafael Almeida12/12/2026
Em revisão
Conferir petição inicial0004321-98.2026.8.26.0100Seguradora NorteCamila Ribeiro09/12/2026
Atrasada
Anexar procuração0007788-10.2026.8.26.0100Varejo SulRenata Barros15/12/2026
Pendente
Protocolar recurso0002468-13.2026.8.26.0100Banco AuroraRafael Almeida07/12/2026
Concluída

When to use

  • To compare many records that share the same columns: tarefas, processos, revisores.
  • When operators scan, sort and filter, and need the header visible while they scroll.
  • To show a result set next to the filter controls.

When not to use

  • One record with label and value pairs. Use Data list.
  • A short list with a title and a detail per item. Use List.
  • Nested data. Use Tree view.
  • A table the operator edits cell by cell. Use the editable DataTable, described below.

Anatomy

A table is built from parts that map to native elements.

Part Element Role
Table table Sets the density and wraps the table in a scroll container.
TableHeader thead Sticks to the top of the container.
TableBody tbody Holds the rows. isFetching dims it while data loads.
TableFooter tfoot Totals or a summary row.
TableRow tr A row. data-state="selected" marks it as selected.
TableHead th A column header.
TableCell td A data cell.
TableCellTitle td The cell that names the row. Heavier text.
TableCaption caption Names the table. Shown below it.

Sizes

Density is a display preference. Keep the rows, selection and filters when it changes.

TarefaNúmero do processoClienteRevisorPrazoStatus
Revisar contestação0001234-56.2026.8.26.0100Banco AuroraRafael Almeida12/12/2026
Em revisão
Conferir petição inicial0004321-98.2026.8.26.0100Seguradora NorteCamila Ribeiro09/12/2026
Atrasada
TarefaNúmero do processoClienteRevisorPrazoStatus
Revisar contestação0001234-56.2026.8.26.0100Banco AuroraRafael Almeida12/12/2026
Em revisão
Conferir petição inicial0004321-98.2026.8.26.0100Seguradora NorteCamila Ribeiro09/12/2026
Atrasada
TarefaNúmero do processoClienteRevisorPrazoStatus
Revisar contestação0001234-56.2026.8.26.0100Banco AuroraRafael Almeida12/12/2026
Em revisão
Conferir petição inicial0004321-98.2026.8.26.0100Seguradora NorteCamila Ribeiro09/12/2026
Atrasada
Density Use for
compact Dense work lists. Smaller text and tighter cells.
regular Default.
comfortable Tables with few rows, or with actions and tags in the cells.

States

Selected rows

Set data-state="selected" on the row and show the selection with a checkbox that has its own accessible name.

TarefaRevisorPrazo
Revisar contestaçãoRafael Almeida12/12/2026
Conferir petição inicialCamila Ribeiro09/12/2026
Anexar procuraçãoRenata Barros15/12/2026

Fetching

isFetching on TableBody dims the body while new data loads. Set aria-busy on the table too.

TarefaNúmero do processoClienteRevisorPrazoStatus
Revisar contestação0001234-56.2026.8.26.0100Banco AuroraRafael Almeida12/12/2026
Em revisão
Conferir petição inicial0004321-98.2026.8.26.0100Seguradora NorteCamila Ribeiro09/12/2026
Atrasada
Anexar procuração0007788-10.2026.8.26.0100Varejo SulRenata Barros15/12/2026
Pendente
Protocolar recurso0002468-13.2026.8.26.0100Banco AuroraRafael Almeida07/12/2026
Concluída

Empty

Keep the header and show one row with a short message that says why it is empty.

TarefaNúmero do processoClienteRevisorPrazoStatus
Nenhuma tarefa encontrada para os filtros aplicados.

Examples

TarefaNúmero do processoClienteRevisorPrazoStatus
Revisar contestação0001234-56.2026.8.26.0100Banco AuroraRafael Almeida12/12/2026
Em revisão
Conferir petição inicial0004321-98.2026.8.26.0100Seguradora NorteCamila Ribeiro09/12/2026
Atrasada
Anexar procuração0007788-10.2026.8.26.0100Varejo SulRenata Barros15/12/2026
Pendente
Protocolar recurso0002468-13.2026.8.26.0100Banco AuroraRafael Almeida07/12/2026
Concluída
Total de tarefas4
Tarefas da equipe de contencioso

Editable DataTable

DataTable from @repo/ui/data-table renders a grid whose cells read from a store, so editing one cell re-renders only that cell. It is display-only until you pass the editing slots from @repo/ui/data-table/editing. Column widths are in pixels, and editable: false locks a column.

Número do processo
Revisor
Prazo
0001234-56.2026.8.26.0100
Rafael Almeida
12/12/2026
0004321-98.2026.8.26.0100
Camila Ribeiro
09/12/2026
0007788-10.2026.8.26.0100
Renata Barros
15/12/2026

Infinite table

InfiniteDataTable from @repo/ui/infinite-data-table is a sortable table that reveals more rows as the operator scrolls, through a load-more row that also works as a button. The caller owns the paging state, the sort and every label.

ClienteStatus
Revisar contestaçãoBanco Aurora12/12/2026
Em revisão
Conferir petição inicialSeguradora Norte09/12/2026
Atrasada
Anexar procuraçãoVarejo Sul15/12/2026
Pendente
Protocolar recursoBanco Aurora07/12/2026
Concluída

When loading fails, the row shows the error and a retry button.

ClienteStatus
Revisar contestaçãoBanco Aurora12/12/2026
Em revisão
Conferir petição inicialSeguradora Norte09/12/2026
Atrasada
Anexar procuraçãoVarejo Sul15/12/2026
Pendente
Protocolar recursoBanco Aurora07/12/2026
Concluída

Não foi possível carregar mais tarefas.

Content

  • Column headers are short nouns: “Prazo”, “Revisor”. Put units in the header, not in every cell.
  • Use TableCellTitle for the cell that names the row, usually the first.
  • Format dates and amounts before rendering them. Align the format in a column.
  • Write the empty message as a sentence: “Nenhuma tarefa encontrada para os filtros aplicados.”

Do and don’t

ClientePrazo
Banco Aurora12/12/2026
Varejo Sul15/12/2026
DoUse a header row with a name per column.
Banco Aurora, prazo 12/12/2026
Varejo Sul, prazo 15/12/2026
Don'tDon't pack several values in one cell with no header. Operators cannot scan or sort it.

Accessibility

  • Renders native table, thead, tbody, tr, th and td, so screen readers announce the column header for each cell.
  • Use TableHead for column headers and TableCell or TableCellTitle for data. Add scope or a caption when the table needs a name.
  • Set aria-busy="true" while isFetching, because the dimming is only visual.
  • A selected row is marked only by color. Always add a checkbox or a text with the selection.
  • InfiniteDataTable sets aria-sort on the sorted column and gives each sort button an aria-label from your labels.sortColumn. The load-more row is a button inside a polite live region.
  • DataTable uses role="grid" with row and column counts. Pass ariaLabel or ariaLabelledBy so the grid has a name.

Code

import {
  Table,
  TableBody,
  TableCell,
  TableCellTitle,
  TableHead,
  TableHeader,
  TableRow,
} from "@repo/ui/table";

<Table density="regular">
  <TableHeader>
    <TableRow>
      <TableHead>Tarefa</TableHead>
      <TableHead>Revisor</TableHead>
      <TableHead>Prazo</TableHead>
    </TableRow>
  </TableHeader>
  <TableBody>
    <TableRow>
      <TableCellTitle>Revisar contestação</TableCellTitle>
      <TableCell>Rafael Almeida</TableCell>
      <TableCell>12/12/2026</TableCell>
    </TableRow>
  </TableBody>
</Table>;

Props

Table
PropTypeDefaultDescription
density"comfortable" | "compact" | "regular"regularRow height and text size of the whole table
TableBody
PropTypeDefaultDescription
isFetchingboolean—Dims the body and pulses it while data loads.
TableRow
PropTypeDefaultDescription
data-state"selected"—Marks the row as selected and fills it.

TableHeader, TableFooter, TableHead, TableCell, TableCellTitle and TableCaption take the props of their native element. TableContainer is the scroll wrapper that Table renders for you.

InfiniteDataTable
PropTypeDefaultDescription
rowsT[]—Loaded rows.
visibleColumnsColumnDef<T>[]—Columns to show. Each has `id`, `header`, `cell`, and optionally `field` and `sortable`.
getRowId(row: T) => string—Stable id of a row.
density"compact" | "regular" | "comfortable"—Same as the Table density.
sortBy / sortDirstring—Sorted column field and direction (`asc` or `desc`).
scopeKeystring—Changes when the result set changes. Scrolls back to the top.
hasMore / isLoadingMore / loadMoreErrorboolean—Paging state, owned by the caller.
onLoadMore / onRetry / onSort() => void | (column) => void—Called when the operator loads more, retries or sorts.
onRowClick(event, row) => void—Makes rows clickable.
getRowProps(row: T) => HTMLAttributes—Extra attributes per row, such as an id or a highlight.
labelsInfiniteDataTableLabels—Translated copy: `sortColumn`, `loadMore`, `loading`, `retry`, `error`.
DataTable
PropTypeDefaultDescription
storeIDataTableStore<T>—Data source. Create it with `createDataTableStore(rows)`. Rows need an `id`, or pass `getRowId` to the store.
columnsDataTableColumn<T>[]—Each column has `key`, `label` and `width` in pixels, and optionally `editable`, `flexGrow`, `renderCell`, `renderEditor` and validators.
rowHeightnumber—Fixed row height in pixels.
ariaLabel / ariaLabelledBystring—Accessible name of the grid.
componentsDataTableSlots<T>—Replaces any part of the render tree, for example the cell behavior that enables editing.

Known issues

Issue Effect
TableContainer always sets id="table-container". Duplicate ids when a page has more than one table, as on this page. Invalid HTML.
isFetching sets bg-neutral-white opacity-40 on the whole tbody. neutral-white is 100% white in every theme. In Dark and Darker the body turns white while loading, and the text fades with it.
In compact, TableCellTitle uses text-sm while other cells use text-xs. The title cell is larger than its neighbors.
TableRow sets py-4 and min-h-20 on the tr. Padding on a table row element has no effect in table layout. The row height comes from the cells.
TableRow always has hover:bg-secondary. Rows that cannot be clicked look interactive.
DataTable uses border-border and bg-background, and cells use border-border/40. The preset has no such tokens. The grid falls back to the global old-border color, has no background, and the cell borders are translucent.
InfiniteDataTable makes rows clickable with onRowClick and cursor-pointer only. Rows have no role, no tab stop and no key handler. Keyboard users cannot open them.
Edit this page on GitHub