Kibo UI
Header Background

Table

Table views are used to display data in a tabular format. They are useful for displaying large amounts of data in a structured way.

Installation

npx kibo-ui@latest add table

Features

  • Customizable columns
  • Sortable columns

Examples

Simple version

Props

The Table component is made up of the following subcomponents:

TableProvider

The TableProvider component is the root component of the Table. It contains the context for the other components.

PropTypeDefault
columns
ColumnDef<TData, TValue>[]
-
data
TData[]
-
children
ReactNode
-
className
string
-

TableHeader

The TableHeader component is a container for the column headers of the Table.

PropTypeDefault
className
string
-
children
(props: { headerGroup: HeaderGroup<unknown>; }) => ReactNode
-

TableHeaderGroup

The TableHeaderGroup component is a container for the column headers of the Table.

PropTypeDefault
headerGroup
HeaderGroup<unknown>
-
children
(props: { header: Header<unknown, unknown>; }) => ReactNode
-

TableHead

The TableHead component is a single column header in the Table.

PropTypeDefault
header
Header<unknown, unknown>
-
className
string
-

TableBody

The TableBody component is a container for the rows of the Table.

PropTypeDefault
children
(props: { row: Row<unknown>; }) => ReactNode
-
className
string
-

TableRow

The TableRow component is a single row in the Table.

PropTypeDefault
row
Row<unknown>
-
children
(props: { cell: Cell<unknown, unknown>; }) => ReactNode
-
className
string
-

TableCell

The TableCell component is a single cell in the Table.

PropTypeDefault
cell
Cell<unknown, unknown>
-
className
string
-

On this page