Table

A semantic table with striping, hover states, sticky headers and two variants.

VersionReleasedStatus
0.3.0Jun 28Stable
0.2.1Jun 14Stable
0.2.0Jun 02Deprecated
Astralis UI release history

Import#

import { Table } from "astralis-ui";
// Table.Header, .Body, .Footer, .Row, .Head, .Cell, .Caption

Usage#

The compound parts map one-to-one onto native table elements — you keep full control of rows and cells, and the root handles horizontal overflow with its own scroll container.

Props#

PropTypeDefaultDescription
variant"line" | "outline""line"Subtle row dividers, or a bordered box.
size"sm" | "md" | "lg""md"Cell padding and text size.
stripedbooleanfalseAlternate row backgrounds.
interactivebooleanfalseRow highlight on hover.
stickyHeaderbooleanfalseHeader pins while the body scrolls.

Table.Head defaults scope="col"; Table.Caption takes placement: "top" | "bottom" (default bottom). All parts forward their native element attributes.

Accessibility#

Real table/thead/th[scope]/caption semantics — screen readers get the table for free; striping and hover are purely visual.