Skip to the tables
Bootstrap 6.0.0-alpha1

Bootstrap 6 Tables

Ten table layouts covering what real admin and reporting screens need — sorting, filtering, pagination, row selection and a pinned-column matrix. Every one renders the same dataset, so what differs is the treatment, not the content. No datatable library.

Using these

Each table is a standalone page. Copy the markup out of the one you want and drop it into your project. The static variants need only Bootstrap 6’s CSS; sorting, filtering, pagination and row selection are a few dozen lines of vanilla JavaScript in assets/js/main.js, which you can lift wholesale or ignore.

What is new in v6

md:table-stacked is the one worth knowing about. Below the breakpoint it turns each row into a labelled block, so there is no horizontal scrolling on a phone.

Three things about it are easy to get wrong, and all three fail silently. The bare .table-stacked class stacks at every width — the breakpoint prefix is what makes it responsive. The prefixed variants are @container queries, so the table needs a .table-responsive ancestor to give them something to measure. And the labels come from data-cell="…" on each cell; the hidden <thead> does not supply them, so without it you get an unlabelled stack.

Markup that pays off

Use <th scope="row"> for the identifying cell in each row, not <td>. It is what makes a screen reader announce which record a cell belongs to, and it is what .md:table-stacked keys off when it reflows. Keep a <caption> too — it is the accessible name of the table.

Numbers

Money and quantity columns need font-variant-numeric: tabular-nums and right alignment or the digits will not line up. That is the .num class in this pack’s stylesheet.

A gotcha worth knowing

Combobox’s search and multiple options are typed booleans, so a bare attribute fails config validation. Write data-bs-search="true", not data-bs-search.