Table playground
A semantic data table with sticky headers, numeric columns and selected rows.
Preview
Props editor
State matrix
Published example
API reference'use client'
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@ancrel/ui'
import '@ancrel/tokens/css'
import '@ancrel/ui/styles.css'
export default function App() {
return (
<Table caption="Materials" stickyHeader>
<TableHeader>
<TableRow>
<TableHead>Material</TableHead>
<TableHead numeric sort="descending">Sheets</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow selected><TableHead scope="row">Paper</TableHead><TableCell numeric mono>120</TableCell></TableRow>
<TableRow><TableHead scope="row">Cardstock</TableHead><TableCell numeric mono>16</TableCell></TableRow>
</TableBody>
</Table>
)
}