logo-icon
STW UI

Table

Table can be used to show a list of data in a table format.

Usage

svelte
import { Table } from 'stwui';
import type { TableColumn } from 'stwui/types';
// OR
import Table from 'stwui/table'; // for tree shaking
import type TableColumn from 'stwui/types/table-column; // for tree shaking';

Basic

Card Header
a 1 a 2 a 5
aa 1 aa 2 aa 5
ab 1 ab 2 ab 5
ac 1 ac 2 ac 5
ae 1 ae 2 ae 5
af 1 af 2 af 5
ag 1 ag 2 ag 5
ah 1 ah 2 ah 5
ai 1 ai 2 ai 5
aj 1 aj 2 aj 5
ak 1 ak 2 ak 5
al 1 al 2 al 5
am 1 am 2 am 5
an 1 an 2 an 5
ao 1 ao 2 ao 5
ap 1 ap 2 ap 5
aq 1 aq 2 aq 5
ar 1 ar 2 ar 5
as 1 as 2 as 5
at 1 at 2 at 5
au 1 au 2 au 5
av 1 av 2 av 5
aw 1 aw 2 aw 5

Table Props

columns TableColumn[] []

Table Slots

header <Table.Header slot="header" />
body <Table.Body slot="body" />
footer <Table.Footer slot="footer" />

Table.Header Props

order 'asc' | 'desc' asc
orderBy string
onColumnHeaderClick ((page: number) => void) | undefined

Table.Body Props

id string table-body

Table.Body Slots

default

Table.Body.Row Props

id string

Table.Body.Row Slots

default

Table.Body.Row.Cell Props

column number

Table.Body.Row.Cell Slots

default

Table.Footer Slots

default

Table Class Identifiers

stwui-table
stwui-table-header-wrapper
stwui-table-header
stwui-table-body
stwui-table-body-row
stwui-table-body-row-cell
stwui-table-footer