Skip to content
UI Kit
Accent color

Data tables with sorting, filters and paging

Tables that stay readable: search, filters, selection, sorting, pages and details. Phones get a compact list.

6 variants
Switch category

Tables that stay readable

A data table is the workhorse of every back office. The six tables here keep real table markup with headers for screen readers, sort and filter on the client, and turn into a compact list on phones instead of scrolling sideways.

Simple shows a short list of records. Search and filter adds a search field and filter chips for larger sets. Selection lets people check rows and act on several at once, with a bar that shows the count. Sortable with pages handles hundreds of rows, Dense fits more on a screen for experts, Expandable rows opens details below a row without leaving the page.

Align numbers right and text left, and keep units in the header instead of every cell. Sort by the column people need most by default. For thousands of rows sort and page on the server, the tables take the current page and the total as props.

Data table

Simple

A calm table with status labels and tabular numbers.

Search and filter

A search field, a segmented filter with counts and a friendly empty state.

Selection

Checkboxes with select all and a floating bar for bulk actions.

Sortable with pages

Every column sorts, headers announce the order, pages with a size picker.

Dense

Many rows at a glance, a sticky header and totals in the footer.

Expandable rows

Each row opens its details in place: items, carrier and delivery progress.

Details

What Data table brings along, read from the registry and the source.

Area
App
Variants
6
Version
1.0.0 · since 1.0.0
File
components/ui/data-table.tsx
Brings along
utilskitbuttonicon
npm packages
None
Languages
English and German, 23 texts of its own
Studio
Adjust in code
In collections
App dashboard

Props

The DataTableProps interface from components/ui/data-table.tsx, with the comments from the code.

  • idrequired
    string

Built-in texts

Data table writes these texts itself. The language follows the KitProvider, the labels prop replaces single ones.

Show all 23 texts
searchEnglish SearchGerman Suchen
clearEnglish Clear searchGerman Suche leeren
allEnglish AllGerman Alle
resultsEnglish {n} resultsGerman {n} Treffer
resultEnglish 1 resultGerman 1 Treffer
emptyEnglish Nothing matches “{q}”.German Nichts passt zu „{q}“.
emptyHintEnglish Try another word or reset the filters.German Versuch ein anderes Wort oder setz die Filter zurück.
resetEnglish Reset filtersGerman Filter zurücksetzen
selectAllEnglish Select all rowsGerman Alle Zeilen auswählen
selectRowEnglish Select {name}German {name} auswählen
selectedEnglish {n} selectedGerman {n} ausgewählt
clearSelectionEnglish Clear selectionGerman Auswahl aufheben
sortAscEnglish Sort ascendingGerman Aufsteigend sortieren
sortDescEnglish Sort descendingGerman Absteigend sortieren
showingEnglish {from} to {to} of {total}German {from} bis {to} von {total}
prevEnglish Previous pageGerman Vorherige Seite
nextEnglish Next pageGerman Nächste Seite
pageEnglish Page {n}German Seite {n}
perPageEnglish Rows per pageGerman Zeilen je Seite
expandEnglish Show details for {name}German Details zu {name} zeigen
collapseEnglish Hide details for {name}German Details zu {name} verbergen
totalEnglish TotalGerman Summe
detailsEnglish DetailsGerman Details

Accessibility

Read from the source of the component.

  • Data table handles the keys Arrow up, Arrow down, Arrow left, Arrow right and Space itself.
  • Sets aria-checked, aria-controls, aria-current, aria-expanded, aria-label, aria-live and aria-sort, so screen readers announce purpose and state.
  • Uses the roles radio, radiogroup and region.
  • Announces changes through a live region without moving focus.
  • Every field has a label, visible or for screen readers.
  • Adds text for screen readers where icons and graphics stand alone.
  • The server renders the starting state in full, JavaScript only adds the interaction.

Motion

  • Brings animations of its own, calmly timed and without wobble.
  • With reduced motion (prefers-reduced-motion) it stays still. 4 places in the code switch motion off then.

Frequent questions

How do I install Data table?

With aiw add @ai-website/data-table. The command puts components/ui/data-table.tsx into your project, the code is yours from then on. It brings along button and icon. It needs no further npm packages.

Which variants does Data table have?

6 variants, Simple, Search and filter, Selection, Sortable with pages, Dense and Expandable rows. You pick one with the variant prop, for example variant="search-filter".

Can I translate the texts of Data table?

Yes. Data table carries 23 texts of its own in English and German, such as “Search”, “Clear search” and “All”. The language follows the KitProvider, single texts change through the labels prop.

Can an AI assistant build with Data table?

Yes. Through the MCP server of the aiw CLI, Claude, Cursor, GitHub Copilot, Windsurf, Codex and Gemini find Data table with aiw_components and install it with aiw_add @ai-website/data-table. Name the variant in your prompt, for example variant="simple", and the assistant writes your content straight into the props.

Often searched

Jump to

Copied to the clipboard