"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
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#
colorScheme
colorScheme
Type
Default
"gray"
size
size
Type
"sm" | "md" | "lg"
Default
"md"
variant
variant
Type
"unstyled" | "simple" | "striped"
Default
"simple"
Td#
isNumeric
isNumeric
Description
Aligns the cell content to the right
Type
boolean
Th#
isNumeric
isNumeric
Description
Aligns the cell content to the right
Type
boolean
TableCaption#
placement
placement
Description
The placement of the table caption. This sets the `caption-side` CSS attribute.
Type
"bottom" | "top"
Default
"bottom"