Skip to main content

Table

Result
Loading...
Live Editor

Variants

The table-<variant name> classes can be applied to the table, row, or cell to change the background color of the elements.

Tables

Result
Loading...
Live Editor

Rows

Result
Loading...
Live Editor

Cells

Result
Loading...
Live Editor

Header Radii

Result
Loading...
Live Editor

Sizes

Result
Loading...
Live Editor

Striped

Rows

Result
Loading...
Live Editor

Columns

Result
Loading...
Live Editor

Collapsible Tables

Kyber Tables provides stateful expand/collapse functionality through the collapsible prop and the TableRowToggle component. Collapsible rows are managed by the row's ids and the TableRowToggle's forRows prop.

For detailed props of collapsible tables see the withCollapsibleState HOC.

When creating collapsible rows considering the following best practices:

  1. A <TableRow /> that contains a <TableRowToggle /> should be adjacent to its collapsible row. There's no requirement that a <TableRow /> with a <TableRowToggle /> be followed by its managed collapsible rows, however, we consider it a best practice to keep them together.

If a row is intended to be collapsible, it MUST receive the collapsible prop.

Result
Loading...
Live Editor

Controlling Multiple Collapsible Rows

It's also possible to use the <TableRowToggle/>'s forRows prop to toggle multiple collapsible areas within a table.

Result
Loading...
Live Editor

Sortable Tables

Kyber Tables provides stateful sort UI controls through the sortable props on <Table /> and <TableCell /> components. Kyber only maintains UI control over the presentation of <TableCell />s within a <TableHeader />. The individual rows of the <Table /> must be sorted by the user.

For detailed props of sortable tables see the withSortableState HOC.

Result
Loading...
Live Editor

Sortable and Collapsible Tables

Result
Loading...
Live Editor

Fixed Tables

The Kyber Table's Table component provides the fixedHeader and fixedFooter props that can be used to create a table with fixed headers, footers.

Result
Loading...
Live Editor

Fixed columns

It's also possible to lock the first column of the table in place by using the fixedColumn prop.

Result
Loading...
Live Editor
Result
Loading...
Live Editor

Stacked Tables

Resize the viewport to be narrower than 768px to view the stacked table.

Result
Loading...
Live Editor

Props

Table

TableRow

TableCell

TableFooter