Table
Installation
Usage
Root renders a table. Wrap it inScrollArea when columns need horizontal scrolling. OmitCaption orFooter when
the data does not need them. Setclass on
each part to change alignment, wrapping, or column widths.
Head defaults toscope="col" . Usescope="row" for row headings.Cell acceptscolspan ,rowspan , andheaders .
For sorting, put a Button in the heading and updatearia-sort when the order changes. Keep selection and pagination in your
application state, using Checkbox and Pagination as needed.
Inset
Sorting and selection
API reference
Table.Root
| Prop | Type | Default |
|---|---|---|
variant | "inset" | "default" | undefined | 'default' |
pnpm dlx @mielui/svelte add table