Table#

Tables display structured data in rows and columns using a compound component pattern.

Import#

TSX
import { Table } from '@sigx/daisyui';

Basic Usage#

TSX
Loading preview...

Active Row#

Use the active prop on Table.Row to highlight a row.

TSX
Loading preview...

Hover Row#

Use the hover prop on Table.Row to highlight rows on hover.

TSX
Loading preview...

Zebra Striping#

Use the zebra prop to add alternating row backgrounds.

TSX
Loading preview...

Use Table.Foot to add a footer section with pinned rows.

TSX
Loading preview...

Pinned Rows#

Use pinRows to make header and footer rows sticky when scrolling vertically.

TSX
Loading preview...

Pinned Columns#

Use pinCols to make <th> columns sticky when scrolling horizontally.

TSX
Loading preview...

Sizes#

Available sizes: xs, sm, md (default), lg, and xl.

TSX
Loading preview...

With Actions#

TSX
Loading preview...

Props#

Table Props#

PropTypeDefaultDescription
zebrabooleanfalseAlternate row background colors
pinRowsbooleanfalseMake header/footer rows sticky when scrolling vertically
pinColsbooleanfalseMake <th> columns sticky when scrolling horizontally
size'xs' | 'sm' | 'md' | 'lg' | 'xl'Table size
classstringAdditional CSS classes

Table.Row Props#

PropTypeDefaultDescription
hoverbooleanfalseHighlight row on hover
activebooleanfalseHighlight row as active
classstringAdditional CSS classes

Sub-Components#

ComponentDescription
Table.HeadTable header section (<thead>)
Table.BodyTable body section (<tbody>)
Table.FootTable footer section (<tfoot>)
Table.RowTable row (<tr>) — supports hover and active props
Table.ThTable header cell (<th>)
Table.TdTable data cell (<td>)