Skip to content
Displaynew

Table

A comprehensive data table component for displaying structured information. Supports sorting, row selection, sticky headers, and custom empty states.

LlmTable
WCAG AA0 deps

Demo

Live PreviewReact

Interactive demo coming soon. See the code example above.

jsx
<LlmTable variant="striped">
  <LlmThead>
    <LlmTr>
      <LlmTh sortable>Name</LlmTh>
      <LlmTh>Status</LlmTh>
    </LlmTr>
  </LlmThead>
  <LlmTbody empty={rows.length === 0} colSpan={2}>
    {rows.map(row => (
      <LlmTr key={row.id} selectable>
        <LlmTd>{row.name}</LlmTd>
        <LlmTd>{row.status}</LlmTd>
      </LlmTr>
    ))}
    <div llmTableEmpty>No results found</div>
  </LlmTbody>
</LlmTable>

API (Angular)

PropTypeDefaultDescription
variant'default' | 'striped' | 'bordered''default'Row background styling
size'sm' | 'md' | 'lg''md'Vertical padding of cells
stickyHeaderbooleanfalseMakes header row stick to the top on scroll
aria-labelstring'Table'Accessible name for the scrollable wrapper region. Announced by screen readers when keyboard users focus the wrapper to scroll horizontally.

Composition parts

Table is composed from the parts below. Each part is its own component — drop the ones you don't need.

LlmThead

Header row container. Slot-only — takes no props.

LlmTbody

Body container. Renders its own empty state when empty is true.

PropTypeDefaultDescription
emptybooleanfalseShow an empty-state row instead of children.
colSpannumberNumber of columns the empty-state row should span.

LlmTr

A single row. Can be made selectable for row-level interaction.

PropTypeDefaultDescription
selectedbooleanfalseVisual + ARIA selected state.
selectablebooleanfalseMakes the row keyboard-focusable and emits selection events.
rowIdstringStable identifier for the row — used in selection change events.

LlmTh

A header cell. Make it sortable to expose a sort-toggle button.

PropTypeDefaultDescription
sortablebooleanfalseShows a sort indicator and announces the column as sortable.
sortDirection'asc' | 'desc' | nullnullCurrent sort state when sortable.
align'start' | 'center' | 'end''start'Text alignment in the cell.
widthstringExplicit column width (any CSS length).

LlmTd

A body cell.

PropTypeDefaultDescription
align'start' | 'center' | 'end''start'Text alignment in the cell.

Import

ts
import { LlmTable, LlmThead, LlmTbody, LlmTr, LlmTh, LlmTd } from '@atelier-ui/angular';