Table
Render table with theme styles
Import
Source
Docs
Package
Usage
Table data for all examples:
Element position | Element name | Symbol | Atomic mass |
---|---|---|---|
6 | Carbon | C | 12.011 |
7 | Nitrogen | N | 14.007 |
39 | Yttrium | Y | 88.906 |
56 | Barium | Ba | 137.33 |
58 | Cerium | Ce | 140.12 |
Spacing
To control spacing use horizontalSpacing
and verticalSpacing
props. Both props support spacing from theme.spacing
and any valid CSS value to set cell padding:
Position | Name | Symbol | Mass |
---|---|---|---|
6 | Carbon | C | 12.011 |
7 | Nitrogen | N | 14.007 |
39 | Yttrium | Y | 88.906 |
56 | Barium | Ba | 137.33 |
58 | Cerium | Ce | 140.12 |
Horizontal spacing
Vertical spacing
Caption and tfoot
Table support tfoot and caption elements. Set captionSide
prop (top or bottom) to change caption position.
Element position | Element name | Symbol | Atomic mass |
---|---|---|---|
6 | Carbon | C | 12.011 |
7 | Nitrogen | N | 14.007 |
39 | Yttrium | Y | 88.906 |
56 | Barium | Ba | 137.33 |
58 | Cerium | Ce | 140.12 |
Element position | Element name | Symbol | Atomic mass |
Striped and rows hover
Element position | Element name | Symbol | Atomic mass |
---|---|---|---|
6 | Carbon | C | 12.011 |
7 | Nitrogen | N | 14.007 |
39 | Yttrium | Y | 88.906 |
56 | Barium | Ba | 137.33 |
58 | Cerium | Ce | 140.12 |
Scroll container
To prevent viewport overflow wrap Table
with Table.ScrollContainer
.
The component accepts minWidth
prop which sets minimum width below which table will be scrollable.
By default, Table.ScrollContainer
uses ScrollArea, you can change it
to native scrollbars by setting type="native"
:
Element position | Element name | Symbol | Atomic mass |
---|---|---|---|
6 | Carbon | C | 12.011 |
7 | Nitrogen | N | 14.007 |
39 | Yttrium | Y | 88.906 |
56 | Barium | Ba | 137.33 |
58 | Cerium | Ce | 140.12 |