Table

A structured data display component with rows and columns.

Installation

Install the component package, shared coss-svelte theme, and Bits UI peer.

npm install coss-svelte @coss-svelte/theme bits-ui

Usage

Import the Svelte component exports directly from the package.

import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "coss-svelte";

Anatomy

  • Table
  • TableBody
  • TableCaption
  • TableCell
  • TableFooter
  • TableHead
  • TableHeader
  • TableRow

API Reference

Table

A structured data display component with rows and columns.

children : Snippet<[]>

Inherits from Svelte <div> attributes.

TableBody

Groups the main rows or body content.

children : Snippet<[]>

Inherits from Svelte component attributes.

TableCaption

Provides a caption for the parent component.

children : Snippet<[]>

Inherits from Svelte component attributes.

TableCell

Renders one cell within the parent component.

children : Snippet<[]>

Inherits from Svelte component attributes.

TableFooter

Groups footer content and actions for the parent component.

children : Snippet<[]>

Inherits from Svelte component attributes.

TableHead

Renders a header cell for a table.

PropTypeDefaultDescription
scopeScope"col"Scope attribute forwarded to the table header cell.
children : Snippet<[]>

Inherits from Svelte <th> attributes.

TableHeader

Groups heading content for the parent component.

children : Snippet<[]>

Inherits from Svelte component attributes.

TableRow

Renders one row inside the parent table.

children : Snippet<[]>

Inherits from Svelte component attributes.

Implementation Details

Status
Stable
Foundation
native
Category
Content & Display
Particles
8