# Virtualizer API

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

## Related

- https://0.vuetifyjs.com/components/data/virtualizer
- https://0.vuetifyjs.com/composables/data/create-virtual
- https://0.vuetifyjs.com/components/data/data-table

## Virtualizer.Root

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `items` | `readonly T[] \| undefined` | `[]` | no | The items to virtualize |
| `itemHeight` | `number \| `${number}` \| null \| undefined` | — | no | The height of each item, in pixels (a number or numeric string). Used as the initial estimate for unmeasured items |
| `height` | `string \| number \| undefined` | — | no | Height of the scroll container; numbers and unitless numeric strings are pixels, other strings pass through as CSS |
| `overscan` | `number \| undefined` | `5` | no | Extra items rendered outside the viewport for smoother scrolling (default: 5) |
| `direction` | `any` | `"forward"` | no | The direction of scrolling (default: 'forward') |
| `anchor` | `any` | `"auto"` | no | How scroll position is preserved across data changes (default: 'auto') |
| `anchorSmooth` | `boolean \| undefined` | `true` | no | Whether anchor restoration scrolls smoothly (default: true) |
| `topThreshold` | `number \| undefined` | `0` | no | Pixels from the top edge within which `top` fires (default: 0) |
| `bottomThreshold` | `number \| undefined` | `0` | no | Pixels from the bottom edge within which `bottom` fires (default: 0) |
| `momentum` | `boolean \| undefined` | — | no | Enable iOS momentum scrolling (default: auto-detected) |
| `elastic` | `boolean \| undefined` | — | no | Enable elastic overscroll (default: auto-detected) |
| `namespace` | `string \| undefined` | `"v0:virtualizer:root"` | no | Namespace for context provision |

### Events

| Name | Type | Description |
|---|---|---|
| `top` | `[distance: number]` | — |
| `bottom` | `[distance: number]` | — |

### Slots

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

## Virtualizer.Item

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `index` | `number` | — | yes | The item's index within the full (unvirtualized) list |
| `namespace` | `string \| undefined` | `"v0:virtualizer:root"` | no | Namespace for context injection from parent Virtualizer.Root |

### Slots

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

## Virtualizer.Spacer

### Props

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `edge` | `"start" \| "end" \| undefined` | `"start"` | no | Which off-screen range this spacer reserves. `start` is the rows above the window; `end` is the rows below it |
| `namespace` | `string \| undefined` | `"v0:virtualizer:root"` | no | Namespace for context injection from parent Virtualizer.Root |

### Slots

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