Example
TypeScript
Props
The table structure. Must contain exactly one
<Table.Header /> and one <Table.Body />.<Table.Header />
The header row of the table. Contains the column headers.
Props
<Table.HeaderCell />
A single header cell in the table header.
Props
An optional Attio Icon to display next to the header text.
<Table.Body />
The body of the table containing all data rows.
Props
<Table.Row />
A single data row in the table body.
Props
<Table.Cell />
A single data cell in a table row. Can contain text, links, badges, avatars, or buttons.
Props
The content of the table cell. Can be:
- Plain text, on its own or with
<Link />components - One or more
<Table.Cell.Badge />components - One or more
<Table.Cell.Avatar />components - One or more
<Button />components
Buttons in a cell
Put<Button /> components in a cell to give a row its own actions.
One button renders inline. If the column is too narrow for the label, the label is truncated. Two or more buttons collapse into a menu on the cell, because a column is rarely wide enough for two labels. Picking an action from that menu calls the button’s onClick.
variant and disabled work as they do elsewhere, and a "destructive" button reads as destructive both inline and in the menu.
In a dialog, buttons in a cell stay in the cell. They are not moved to the dialog footer.
On the workspace settings page, buttons in a cell are dropped, and a cell that only held buttons is left blank.
<Table.Cell.Badge />
A badge component for use inside a table cell. Useful for displaying status indicators or categories.
Props
'amber' | 'blue' | 'cyan' | 'green' | 'grey' | 'lavender' | 'lime' | 'orange' | 'pink' | 'purple' | 'red' | 'yellow'
required
The color of the badge.
<Table.Cell.Avatar />
An avatar component for use inside a table cell. Useful for displaying profile pictures or organization logos.
Props
The name of the person or entity represented by the avatar. This is used for accessibility and as
a fallback when no image is provided.