Skip to main content

Table

TSX
<Table
headers={['Name', 'Plan', 'Status']}
data={[
['Jane', 'Pro', 'Active'],
['Carlos', 'Team', 'Active'],
['Asha', 'Free', 'Trial'],
]}
/>
PropTypeDefault
headersstring[]— (shorthand)
datastring[][]— (shorthand)
columnsnumber2 (auto-set from headers.length when shorthand is used)
rowsnumber2 (auto-set from data.length when shorthand is used)
enableHeaderbooleantrue

The headers + data shorthand is the easiest way to build a static table. For full control, use the values escape hatch:

<Table
values={{
table: {
headers: [{ cells: [{ text: 'Name' }, { text: 'Email' }] }],
rows: [{ cells: [{ text: 'John' }, { text: 'john@example.com' }] }],
},
enableHeader: true,
}}
/>