# DataTable API

> Auto-generated API reference for `DataTable` from @vuetify/v0 (Vuetify0).
> Source of truth: https://0.vuetifyjs.com/api/data-table

## Related

- https://0.vuetifyjs.com/components/data/data-table
- https://0.vuetifyjs.com/composables/data/create-data-table
- https://0.vuetifyjs.com/composables/data/create-pagination
- https://0.vuetifyjs.com/composables/data/create-filter
- https://0.vuetifyjs.com/composables/data/create-virtual
- https://0.vuetifyjs.com/components/semantic/pagination
- https://0.vuetifyjs.com/components/semantic/avatar

## DataTable.Root

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `namespace` | `string \| undefined` | `"v0:data-table"` | no | Namespace for dependency injection. |
| `search` | `string \| undefined` | `""` | no | — |

### Events

| Name | Type | Description |
|---|---|---|
| `update:search` | `[value: string]` | — |

### Slots

| Name | Type | Description |
|---|---|---|
| `default` | `DataTableRootSlotProps<T>` | — |

## DataTable.Body

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `namespace` | `string \| undefined` | `"v0:data-table"` | no | Namespace for dependency injection. |

### Slots

| Name | Type | Description |
|---|---|---|
| `default` | `DataTableBodySlotProps<T>` | — |

## DataTable.Cell

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `colspan` | `number \| undefined` | — | no | Number of columns this cell spans |
| `rowspan` | `number \| undefined` | — | no | Number of rows this cell spans |

### Slots

| Name | Type | Description |
|---|---|---|
| `default` | `DataTableCellSlotProps` | — |

## DataTable.Column

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `namespace` | `string \| undefined` | `"v0:data-table"` | no | Namespace for dependency injection. |
| `id` | `string \| undefined` | — | no | Column id — registers this header with the table when set |
| `sortable` | `boolean \| undefined` | `false` | no | Participate in the sort pipeline |
| `filterable` | `boolean \| undefined` | `false` | no | Participate in the filter pipeline |
| `colspan` | `number \| undefined` | — | no | Number of columns this cell spans |
| `rowspan` | `number \| undefined` | — | no | Number of rows this cell spans |

### Slots

| Name | Type | Description |
|---|---|---|
| `default` | `DataTableColumnSlotProps` | — |

## DataTable.Empty

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `namespace` | `string \| undefined` | `"v0:data-table"` | no | Namespace for dependency injection. |

### Slots

| Name | Type | Description |
|---|---|---|
| `default` | `DataTableEmptySlotProps` | — |

## DataTable.Header

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `namespace` | `string \| undefined` | `"v0:data-table"` | no | Namespace for dependency injection. |

### Slots

| Name | Type | Description |
|---|---|---|
| `default` | `DataTableHeaderSlotProps` | — |

## DataTable.Row

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `namespace` | `string \| undefined` | `"v0:data-table"` | no | Namespace for dependency injection. |
| `id` | `any` | — | no | Row identifier. Registers a data ticket when set with `value`. |
| `value` | `object \| undefined` | — | no | Row value to register. Omit on header rows. |
| `index` | `number \| undefined` | — | no | 1-based aria-rowindex. Defaults to the row's position in sortedItems. |
| `selectable` | `boolean \| undefined` | `false` | no | Emit aria-selected. |

### Slots

| Name | Type | Description |
|---|---|---|
| `default` | `DataTableRowSlotProps` | — |

## DataTable.Table

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `namespace` | `string \| undefined` | `"v0:data-table"` | no | Namespace for dependency injection. |

### Slots

| Name | Type | Description |
|---|---|---|
| `default` | `DataTableTableSlotProps` | — |
