table
Table
Rows and columns of data such as orders, with header, footer, caption and an empty state; a wide table scrolls in its box and takes keyboard focus to do so.
States: Default, Hover, Focus
Parts
| Part | File | Does |
|---|---|---|
| Table | Table.vue | Groups all parts of the table, which shows data in rows and columns. |
| TableBody | TableBody.vue | Holds the data rows of the table. |
| TableCaption | TableCaption.vue | Describes in a short line what the table shows. |
| TableCell | TableCell.vue | Holds one value in a row of the table. |
| TableEmpty | TableEmpty.vue | Shows a message in place of rows when the table has no data. |
| TableFooter | TableFooter.vue | Holds the summary rows at the bottom of the table, such as totals. |
| TableHead | TableHead.vue | Labels one column of the table. |
| TableHeader | TableHeader.vue | Holds the row of column labels at the top of the table. |
| TableRow | TableRow.vue | Groups the cells that belong to one entry of the table. |
Anatomy
<Table>
<TableCaption />
<TableHeader>
<TableRow>
<TableHead />
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableCell />
</TableRow>
</TableBody>
<TableFooter>
<TableRow>
<TableCell />
</TableRow>
</TableFooter>
</Table>Styling
| Part | Recipe |
|---|---|
| Table | table |
| Table | focus-ring |
| TableCaption | table-caption |
| TableCell | table-cell |
| TableEmpty | table-empty |
| TableFooter | table-footer |
| TableHead | table-head |
| TableRow | table-row |
Install
Writes 10 files into components/ui/table/. For agents, npx @frontic/ui docs table prints this reference as markdown; the MCP server serves the same.
- npm packages
- @vueuse/core
- reka-ui
API reference
Table Table.vue
Groups all parts of the table, which shows data in rows and columns. Renders a <table>.
| Prop | Type | Default | |
|---|---|---|---|
| class | ClassValue | — | |
| Recipe table | Sets | |
|---|---|---|
| base: table | 2 properties | |
| Recipe focus-ring | Sets | |
|---|---|---|
| base: focus-ring | 3 properties | |
TableBody TableBody.vue
TableCaption TableCaption.vue
TableCell TableCell.vue
TableEmpty TableEmpty.vue
TableHead TableHead.vue
TableHeader TableHeader.vue
TableRow TableRow.vue
Example