Table
Tables are used to organize and display data efficiently. It renders a <table>
element by default.
Chakra UI Pro: Start your application or marketing site with a growing collection of beautiful and responsive UI components.
Ads via Chakra UI
Import#
import {Table,Thead,Tbody,Tfoot,Tr,Th,Td,TableCaption,} from "@chakra-ui/react"
Table Variants#
The table component comes in 3 variants: simple
, striped
, and unstyled
.
The default variant is simple
Change the
variant
values to see the other variants.
Simple Table#
To convert | into | multiply by |
---|---|---|
inches | millimetres (mm) | 25.4 |
feet | centimetres (cm) | 30.48 |
yards | metres (m) | 0.91444 |
To convert | into | multiply by |
Editable Example
Striped Table#
To convert | into | multiply by |
---|---|---|
inches | millimetres (mm) | 25.4 |
feet | centimetres (cm) | 30.48 |
yards | metres (m) | 0.91444 |
To convert | into | multiply by |
Editable Example
Table Sizing#
The table component is available in 3 sizes: sm
, md
, lg
. The default size
is md
.
To convert | into | multiply by |
---|---|---|
inches | millimetres (mm) | 25.4 |
feet | centimetres (cm) | 30.48 |
yards | metres (m) | 0.91444 |
To convert | into | multiply by |
Editable Example
Props#
Table#
Name | Type | Description | Default |
---|---|---|---|
colorScheme | "blue" | "cyan" | "gray" | "green" | "orange" | "pink" | "purple" | "red" | "teal" | "yellow" | "whiteAlpha" | "blackAlpha" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram" | "gray" | |
size | "sm" | "md" | "lg" | "md" | |
variant | "unstyled" | "simple" | "striped" | "simple" |
Td#
Name | Type | Description | Default |
---|---|---|---|
isNumeric | boolean | Aligns the cell content to the right | - |
Th#
Name | Type | Description | Default |
---|---|---|---|
isNumeric | boolean | Aligns the cell content to the right | - |
TableCaption#
Name | Type | Description | Default |
---|---|---|---|
placement | "top" | "bottom" | The placement of the table caption. This sets the `caption-side` CSS attribute. | "bottom" |