Skip to content
Playground

Table

Semantic table anatomy with a responsive overflow container.

Semantic table anatomy with a responsive overflow container.

AssetEnvironmentStatus
api.zenos-ui.pages.devProductionHealthy
console.zenos-ui.pages.devProductionReview
worker.staging.localStagingPaused
TSX
import { Table } from "@zentara-co/zenos-ui";

Table.Root defaults to variant="panel" for a neutral card shell. Use variant="plain" when the table sits inside another surface.

Header and data cells share the same comfortable spacing (16px horizontally and 12px vertically) and body-medium typography. Headers add semibold weight to preserve hierarchy. Captions use the same horizontal inset and font size so they align with the table content.

For a denser table, override Table.Head and Table.Cell with matching padding and typography classes. Keep both parts in sync so column content remains aligned.

Keep descriptive content aligned to the start. Align numeric columns to the end and use tabular numbers to make comparison easier. A footer summarizes columns; a caption gives the table a concise visible description.

ServiceRequestsAvailabilityCost
API gateway12,48099.98%$184.20
Background workers8,10699.91%$96.40
Admin console2,90499.99%$42.10
Monthly total$322.70
Service usage for September 2026.

Set data-selected="true" for the visual selected state. When row selection is meaningful to assistive technology, also expose aria-selected and provide a labeled Checkbox or other selection control in the row.

MemberRoleAccess
Maya ChenAdministratorSelected
Owen ReedAnalystAvailable

Table provides semantic markup and styling while the consumer owns data state. Keep empty and loading messages inside the table structure with a cell spanning every column. Mark loading tables as busy and include readable status text.

FindingSeverity
No findings match the current filters.
AssetStatus
Loading assets…

Table.Root automatically renders a horizontal overflow container. Give wide tables an appropriate minimum width so columns remain readable on small screens, and use containerClassName to style or constrain that wrapper.

Table.Root
Table.Header
Table.Body
Table.Footer
Table.Row
Table.Head
Table.Cell
Table.Caption

API

PropTypeDefaultDescription
variant panel | plain panel Neutral card shell or a bare horizontal scroll wrapper.
containerClassName string — Classes on the responsive table wrapper.
Head.scope "col" | "row" | "colgroup" | "rowgroup" — Associates a native header cell with its data cells.
Cell.colSpan / rowSpan number — Native cell spanning behavior.
Row.data-selected "true" | undefined — Applies the visual selected-row treatment.
native props React.TableHTMLAttributes<HTMLTableElement> — Forwards native attributes, events, aria-*, data-*, className, style, and ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

Table renders native table elements. Use scope="col" for column headers and scope="row" when a body header identifies its row. Provide a caption or accessible name that describes the data without repeating nearby headings. Preserve table semantics for structured data; use layout primitives for purely visual grids. Sorting, selection, and pagination controls need their own labels and state announcements—the Data Table recipe provides an engine-integrated pattern for those behaviors.