YuhuanStudioYunUIDocs
Data Display

Table

Semantic, presentational table family using design-system tokens.

A semantic, presentational table family built on design-system tokens. Table wraps a <table> in an overflow container so wide tables scroll instead of breaking layout. Compose it from TableHeader, TableBody, TableRow, TableHead and TableCell (short aliases Thead, Tbody, Tr, Th, Td are also exported).

Import

import {
  Table, TableHeader, TableBody, TableFooter,
  TableRow, TableHead, TableCell, TableCaption,
} from "@yuhuanowo/yunui";

Basic

Data table

ModelContextStatus
Claude Opus 4.8200KActive
DeepSeek R164KBeta
GPT-4o mini128KLimited

Summary row

ItemCost
Requests$42.00
Storage$8.40
Total$50.40
Billing for the current period.

Props — Table

PropTypeDefaultDescription
containerClassNamestringClass applied to the outer scroll/overflow wrapper.
responsivebooleanStack each row into a labelled card below the `md` breakpoint, so dense many-column tables stay readable on narrow screens instead of forcing a horizontal scroll. Pair with `<TableCell label="…">` to label each value.

The sub-components forward the props of their underlying table elements (<thead>, <tbody>, <tr>, <th>, <td>) plus className:

PropTypeDefaultDescription
TableHeaderHTMLAttributes<HTMLTableSectionElement>Renders <thead>; column-header rows are divided by a subtle border.
TableBodyHTMLAttributes<HTMLTableSectionElement>Renders <tbody>; rows are divided by subtle borders.
TableFooterHTMLAttributes<HTMLTableSectionElement>Renders <tfoot>; a muted summary-row band.
TableRowHTMLAttributes<HTMLTableRowElement>Renders <tr> with a divider and hover highlight.
TableHeadThHTMLAttributes<HTMLTableCellElement>Column header cell <th>: left-aligned, uppercase, muted, small.
TableCellTdHTMLAttributes<HTMLTableCellElement>Standard data cell <td>.
TableCaptionHTMLAttributes<HTMLTableCaptionElement>Caption rendered below the table; muted helper text.

On this page