Skip to content

Table

Free

Shows data in rows and columns with plain HTML table parts. Number columns line up, the head can stay at the top, and a wide table scrolls in its own box.

  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

Use the parts as you use table elements.

invoices-table.tsx

Table

<table>
PropTypeDefaultDescription
containerProps—Props of the scroll box around the table. - aria-label / aria-labelledby: its name while it scrolls. Theirs wins over the caption. The component sets these only while the box scrolls, so a table that fits has no name on a plain div. - className: a height for a table that scrolls inside the box (max-h-96), with a sticky TableHeader. Other props (id, data-*, handlers) pass through. - tabIndex and role belong to the component: it sets them while the box scrolls.
...props<table> attributes—Every other attribute goes to the <table>, with a ref.

TableHeader

<thead>
PropTypeDefaultDescription
stickybooleanfalseKeep the head cells at the top of the scroll box while the body scrolls under them. Give the table a height through containerProps={{ className: "max-h-96" }}.
...props<thead> attributes—Every other attribute goes to the <thead>, with a ref.

TableBody

<tbody>
PropTypeDefaultDescription
...props<tbody> attributes—Every other attribute goes to the <tbody>, with a ref.

TableFooter

<tfoot>
PropTypeDefaultDescription
...props<tfoot> attributes—Every other attribute goes to the <tfoot>, with a ref.

TableRow

<tr>
PropTypeDefaultDescription
...props<tr> attributes—Every other attribute goes to the <tr>, with a ref.

TableHead

<th>
PropTypeDefaultDescription
align"center""end""start"—
numericboolean—
...props<th> attributes—Every other attribute goes to the <th>, with a ref.

TableCell

<td>
PropTypeDefaultDescription
align"center""end""start"—
numericboolean—
...props<td> attributes—Every other attribute goes to the <td>, with a ref.

TableCaption

<caption>
PropTypeDefaultDescription
...props<caption> attributes—Every other attribute goes to the <caption>, with a ref.
  • Use it for data people read across.
  • Use numeric on a head and its cells for numbers.
  • Use sticky on TableHeader with a height on the scroll box.
Left ArroworRight ArrowScrolls a wide table when its box has focus. A table that fits adds no tab stop.

It renders real table elements, so a screen reader reads rows and columns.

A box that scrolls joins the tab order, so a keyboard user can scroll it.

TableCaption names the table.

  1. AddedTable.
Open the release