Skip to content
h v3.13.3
Search the docs
Find a component, section or page.

Table

A responsive table component.

A list of your recent invoices.
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/ui

Usage

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

ref bindable HTMLTableElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLTableAttributes from svelte/elements
Prop Type Default
ref bindable HTMLTableElement | null null
class string
children Snippet
...rest Every prop of HTMLTableAttributes from svelte/elements

Table.Caption

ref bindable HTMLElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLElement> from svelte/elements
Prop Type Default
ref bindable HTMLElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLElement> from svelte/elements

Table.Header

ref bindable HTMLTableSectionElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements
Prop Type Default
ref bindable HTMLTableSectionElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements

Table.Row

ref bindable HTMLTableRowElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLTableRowElement> from svelte/elements
Prop Type Default
ref bindable HTMLTableRowElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLTableRowElement> from svelte/elements

Table.Head

ref bindable HTMLThElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLThAttributes from svelte/elements
Prop Type Default
ref bindable HTMLThElement | null null
class string
children Snippet
...rest Every prop of HTMLThAttributes from svelte/elements

Table.Body

ref bindable HTMLTableSectionElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements
Prop Type Default
ref bindable HTMLTableSectionElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements

Table.Cell

wrap boolean
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.
ref bindable HTMLTdElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLTdAttributes from svelte/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
ref bindable HTMLTableSectionElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements
Prop Type Default
ref bindable HTMLTableSectionElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLTableSectionElement> from svelte/elements