"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"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
variantvalues 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#
colorScheme
colorSchemeType
Default
"gray"size
sizeType
"sm" | "md" | "lg"Default
"md"variant
variantType
"unstyled" | "simple" | "striped"Default
"simple"Td#
isNumeric
isNumericDescription
Aligns the cell content to the right
Type
booleanTh#
isNumeric
isNumericDescription
Aligns the cell content to the right
Type
booleanTableCaption#
placement
placementDescription
The placement of the table caption. This sets the `caption-side` CSS attribute.
Type
"bottom" | "top"Default
"bottom"