Data Table
A sortable data table with custom cell slot overrides, hover states, and an empty state slot.
| Name | Role | Status | ||
|---|---|---|---|---|
| Alice Chen | alice@company.co | Engineer | Active | |
| Ben Okafor | ben@company.co | Designer | Active | |
| Clara Ruiz | clara@company.co | Product | Pending | |
| David Kim | david@company.co | Engineer | Inactive | |
| Eva Schmidt | eva@company.co | Marketing | Active |
MayaDataTable API
| Prop / Event | Type | Default | Description |
|---|---|---|---|
columns | Array | — | Required. Array of columns: { key, label, sortable }. |
rows | Array | — | Required. Array of data objects. |
onRowClick | Function | null | Callback function triggered when a row is clicked. |
#toolbar | Slot | — | Optional slot for a toolbar above the table. |
#cell-{key} | Slot | — | Dynamic slot to override the rendering of a specific cell. |
#empty | Slot | — | Displayed when there are no rows. |