A composable, accessible data table. Compose it with nana-table-header, nana-table-body, nana-table-footer, nana-table-row, nana-table-head, nana-table-cell and nana-table-caption. Built on the CSS table model + surface tokens, so it lays out natively, scrolls horizontally on small screens, and follows the light/dark theme.
Show the full-width empty-state placeholder instead of body rows. Provide the message via `slot="empty"`. The header still renders so the columns stay in context. A single `nana-table-cell` can't span columns (CSS tables have no `colspan`), so the placeholder is rendered as a full-width block below the grid.
hoverable
—
boolean
false
Highlight rows on hover
loading
—
boolean
false
Replace the body rows with an animated skeleton loader while data loads. The header stays visible so the layout doesn't jump when the rows arrive.
maxHeight
max-height
string | undefined
—
Constrain the body height (e.g. `"24rem"`) so the table scrolls vertically. This is what makes `sticky-header` actually stick.
sizing
—
SizingMode
'fill'
Column sizing strategy. - `fill`: Table fills the container width; columns auto-size (default). - `content`: Columns size to their intrinsic content; table scrolls horizontally if wider than the container. - `fixed`: Declared column widths are honoured; required for reliable truncation.
skeletonRows
skeleton-rows
number
4
Number of placeholder rows the skeleton loader renders while `loading`.
stickyHeader
sticky-header
boolean
false
Keep the header visible while the body scrolls. Pair with `max-height` so the body actually scrolls.
variant
—
TableVariant
'default'
Visual style
Events
Event
Description
nana-mode-change
Slots
Slot
Description
(default)
Table sections (header, body, footer, caption)
empty
Full-width placeholder shown when `empty` is set (e.g. a "no results" message). Renders below the header, spanning every column.
CSS parts
Part
Description
::part(container)
The scroll container
::part(table)
The native `<table>` element
::part(cell)
A header or body cell
::part(caption)
The table caption
::part(skeleton)
The skeleton-loader region shown while `loading`
::part(empty)
The empty-state region
CSS custom properties
Property
Description
--nana-table-border-color
Grid / divider colour
--nana-table-row-hover
Row hover background
--nana-table-stripe
Zebra-stripe background (striped variant)
--nana-table-header-bg
Header background colour
--nana-table-header-color
Header text colour
--nana-table-radius
Corner radius of the table's frame. Set to 0 for a flush, full-bleed table.
--nana-table-frame
Width of the frame around the table. Set to 0 to remove it.