Table
A responsive table component.
| Invoice | Status | Method | Amount |
|---|---|---|---|
| INV001 | Paid | Credit Card | $250.00 |
| INV002 | Pending | PayPal | $150.00 |
| INV003 | Unpaid | Bank Transfer | $350.00 |
| INV004 | Paid | Credit Card | $450.00 |
| INV005 | Paid | PayPal | $550.00 |
| INV006 | Pending | Bank Transfer | $200.00 |
| INV007 | Unpaid | Credit Card | $300.00 |
| Total | $2,500.00 | ||
Installation
pnpm add @heyramzi/uiUsage
import * as Table from "@heyramzi/ui/shadcn/table";<Table.Root>
<Table.Caption>A list of your recent invoices.</Table.Caption>
<Table.Header>
<Table.Row>
<Table.Head>Invoice</Table.Head>
<Table.Head>Amount</Table.Head>
</Table.Row>
</Table.Header>
<Table.Body>
<Table.Row>
<Table.Cell>INV001</Table.Cell>
<Table.Cell>$250.00</Table.Cell>
</Table.Row>
</Table.Body>
</Table.Root>API reference
Table.Root
refbindableHTMLTableElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLTableAttributesfromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLTableElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLTableAttributes from svelte/elements | |
Table.Caption
refbindableHTMLElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLElement> from svelte/elements | |
Table.Header
refbindableHTMLTableSectionElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLTableSectionElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLTableSectionElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements | |
Table.Row
refbindableHTMLTableRowElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLTableRowElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLTableRowElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLTableRowElement> from svelte/elements | |
Table.Head
refbindableHTMLThElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLThAttributesfromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLThElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLThAttributes from svelte/elements | |
Table.Body
refbindableHTMLTableSectionElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLTableSectionElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLTableSectionElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements | |
Table.Cell
wrapboolean- Default
false - Lets a long user string wrap, so a trailing action cell keeps its place. Off by default: amounts and dates stay on one line.
refbindableHTMLTdElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLTdAttributesfromsvelte/elements
| Prop | Type | Default |
|---|---|---|
wrap Lets a long user string wrap, so a trailing action cell keeps its place. Off by default: amounts and dates stay on one line. | boolean | false |
ref bindable | HTMLTdElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLTdAttributes from svelte/elements | |
Table.Footer
refbindableHTMLTableSectionElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLTableSectionElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLTableSectionElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements | |