# createOverflow API

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

## Related

- https://0.vuetifyjs.com/composables/semantic/create-overflow
- https://0.vuetifyjs.com/components/semantic/overflow
- https://0.vuetifyjs.com/components/semantic/breadcrumbs
- https://0.vuetifyjs.com/components/semantic/pagination
- https://0.vuetifyjs.com/composables/data/create-virtual

## Functions

### createOverflow

Creates a new overflow context for computing how many items fit in a container.

```ts
(options?: OverflowOptions) => E
```

### createOverflowContext

Creates an overflow context with dependency injection support.

```ts
(_options?: OverflowContextOptions) => ContextTrinity<E>
```

### useOverflow

Returns the current overflow context from dependency injection.

```ts
(namespace?: string) => E
```

## Options

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `container` | `MaybeRefOrGetter<Element \| null \| undefined>` | — | no | Container element to track. Can be a ref, getter, or MaybeRefOrGetter. When provided, useOverflow tracks this element's width automatically. Accepts null for compatibility with Vue's useTemplateRef. |
| `gap` | `MaybeRefOrGetter<number> \| undefined` | — | no | Gap between items in pixels |
| `reserved` | `MaybeRefOrGetter<number> \| undefined` | — | no | Reserved space in pixels (for nav buttons, ellipsis, etc) |
| `itemWidth` | `MaybeRefOrGetter<number> \| undefined` | — | no | Uniform item width in pixels. When provided, enables uniform mode where capacity is calculated as available space / itemWidth. Use this for same-width items like pagination buttons. |
| `reverse` | `MaybeRefOrGetter<boolean> \| undefined` | — | no | Calculate capacity from end instead of start. Useful for breadcrumbs where trailing items take priority. Only affects variable mode (uniform mode capacity is direction-independent). |

## Methods

| Name | Type | Description |
|---|---|---|
| `measure` | `(index: number, el: Element \| undefined) => void` | Register an item's element for width measurement. Required for every child in both modes — variable mode reads the measured widths for capacity; uniform mode reads only the entry count for isOverflowing. Pass `undefined` to unregister. |
| `reset` | `() => void` | Clear all measurements |

## Properties

| Name | Type | Description |
|---|---|---|
| `container` | `ShallowRef<Element \| null \| undefined>` | Container element ref |
| `width` | `Readonly<ShallowRef<number>>` | Current container width |
| `capacity` | `ComputedRef<number>` | How many items fit in available space |
| `total` | `ComputedRef<number>` | Total width of all measured items |
| `isOverflowing` | `Readonly<Ref<boolean, boolean>>` | Whether items overflow the container |
