Table

Rows of data with sorting, filtering and pages, from data and columns.

Example

Package ↕
What it is ↕
@dash/serverAPI, SSR and the JSX factory
@dash/clientThe browser runtime
@dash/uiComponents and themes
@dash/dataCollections and the Local API
tsx
<Table
  sortable
  columns={[{ id: "name", header: "Package", accessor: "name" }, { id: "role", header: "What it is", accessor: "role" }]}
  data={[{ name: "@dash/server", role: "API, SSR and the JSX factory" }, { name: "@dash/client", role: "The browser runtime" }, { name: "@dash/ui", role: "Components and themes" }, { name: "@dash/data", role: "Collections and the Local API" }]}
/>

Usage

Pages are built on the server: import the tags from @dash/server and return the tree. The browser runtime draws it.
tsx
import { Table } from "@dash/server";

Props

TableProps

Prop
Type
Description
data (required)unknown[]
columns (required)ColumnDef[]
sortableboolean
filterableboolean
paginationTablePaginationConfig | boolean
emptyMessagestring

ColumnDef

Prop
Type
Description
id (required)string
header (required)string
accessorstring
sortableboolean
filterableboolean
widthstring | number
align"left" | "center" | "right"
cellUINode | ((value: unknown, row: unknown) => React.ReactNode)Custom cell: a UI node, or a client-side render function.
PreviousAlert
NextList
On this page