A native, styled table element.
Apple | Green | 2 |
Banana | Yellow | 3 |
---
import { Table } from 'fulldev-ui'
---
<Table
size="md"
color="base"
/>
Apple | Green | 2 |
Banana | Yellow | 3 |
Props
The Table
component exists of multiple sub-components. Each sub-component has its own set of props.
<Table>
header | string[] | - |
body | string[][] | - |
footer | string[] | - |
size | sm | md | lg | - |
color | base | brand | - |
scheme | light | dark | - |
text | string | - |
html | string | - |
HTML Attributes | HTMLAttributes<table> | - |
cells | string | - |
HTML Attributes | HTMLAttributes<thead> | - |
<TableBody>
rows | string[] | - |
HTML Attributes | HTMLAttributes<tbody> | - |
<TableRow>
cells | string[] | - |
HTML Attributes | HTMLAttributes<tr> | - |
<TableCell>
text | string | - |
html | string | - |
HTML Attributes | HTMLAttributes<td> | - |
cells | string[] | - |
HTML Attributes | HTMLAttributes<tfoot> | - |
Examples
size
The size prop cascades: it is inherited from the parent and it is applied to all children.
Props vs slots
instead of creating each row with a TableRow
component, you can use the rows
prop in the TableBody
component.