---
title: "Overflow List"
description: "One row of items that never wraps: what does not fit folds into a +N button that opens the rest. For Badges, chips, breadcrumb steps, or toolbar buttons."
url: https://gelatinui.com/components/overflow-list
markdown_url: https://gelatinui.com/components/overflow-list.md
access: free
install: "npx shadcn@latest add @gelatin-ui/overflow-list"
registry_item: https://gelatinui.com/r/overflow-list.json
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Overflow List

> One row of items that never wraps: what does not fit folds into a +N button that opens the rest. For Badges, chips, breadcrumb steps, or toolbar buttons.

Page: https://gelatinui.com/components/overflow-list

## When to use it

Best for: A row of items in a narrow place, where the rest fold into a +N that opens them.

- Use `collapseFrom="start"` when the last items matter most.
- Use `minVisible` to always show the first item.
- Use `render` on the root for a real list.

## When not to use it

- For items that may wrap to a new row, use a [Tag Group](https://gelatinui.com/components/tag-group.md).

## Notes for agents

- `items`, `itemKey`, and `renderItem` draw each item, in an `OverflowListItem`.
- `children` on `OverflowListIndicator` gets the hidden items for your own popup.
- `onOverflowChange` runs only when the hidden set changes.
- Let a label shrink and cut its text when you set `minVisible`.

## Anatomy

```text
OverflowList
├─ OverflowListItem (0..n)
└─ OverflowListIndicator (0..n)
```

## API reference

### OverflowList

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `readonly Item[]` |  | The items, in order. |
| `renderItem` | `function` |  | Renders one item: return one element (an `OverflowListItem` is best), with no `key` (the list sets it from `itemKey`). It runs for the row, the popup, and the hidden measure clone. `state.index` is the place in `items`. `state.measuring` is `true` for the clone: return a plain copy of the same size then, with no `id` and no effect, and never a part that joins the roving focus of a parent (`ToolbarButton` → `Button`). The clone is `inert`: a parent that moves focus with the arrow keys would try to focus it and fail. |
| `itemKey` | `function` |  | A stable key for each item (an id), unique in `items`. Required: an index key moves the state of an item (focus, an open popup, a motion) to the wrong item when items are added, removed, or moved. |
| `collapseFrom` | `OverflowCollapseFrom` | "end" | Where items fold: `end` (default) keeps the first ones, `start` keeps the last ones. |
| `minVisible` | `number` | 0 | Items that always show, even when they do not fit. A kept item that does not fit gets `data-forced` (an `OverflowListItem` then may shrink and cut its text). Use 1 for labels and paths, so the row never shows "+6" alone. Default 0. |
| `onOverflowChange` | `function` |  | Called when the set of hidden items changes (by item), not on each resize frame. |
| `locale` | `string` |  | Formats the count with `Intl.NumberFormat` ("ar-EG": "+٣"). Default: the `DisplayLocaleProvider` locale, else `"en-US"`. |
| `labels` | `Partial<{ more: string; }>` |  | The words (`OVERFLOW_LIST_LABELS`). Keep the object stable. |
| `children` | `function` |  | The indicator and its popup, with the hidden items: a `Menu` of links, a `Popover` of people. With `state.measuring`, return a plain copy of the same size (an `OverflowListIndicator`, a `Button`), never a `ToolbarButton` or a trigger. Leave it out for the default: an `OverflowListIndicator` that opens a `Popover` with the hidden items. |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### OverflowListItem

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

### OverflowListIndicator

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `size` | `"default" \| "sm"` | "sm" |  |

Also takes every prop of Base UI `UseRender`: https://base-ui.com/react/components/use-render

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| OverflowList | `overflow-list` | `data-measuring` | `--overflow-list-height`, `--overflow-list-min-width` | `hit-area` |
| OverflowListItem | `overflow-list-item` | `data-forced` |  |  |
| OverflowListIndicator | `overflow-list-indicator` | `data-disabled`, `data-popup-open` |  | `hit-area`, `motion-timing` |

## Usage

Give it the items and a render function.

The sample also uses `badge`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui/overflow-list @gelatin-ui/badge
```

```tsx title="labels-cell.tsx"
import { Badge } from "@/components/ui/badge";
import { OverflowList, OverflowListItem } from "@/components/ui/overflow-list";

const LABELS = ["Billing", "Design", "Urgent", "Customer", "Q4"];

export function LabelsCell() {
  return (
    <OverflowList
      items={LABELS}
      itemKey={(label) => {
        return label;
      }}
      renderItem={(label) => {
        return (
          <OverflowListItem>
            <Badge variant="outline">{label}</Badge>
          </OverflowListItem>
        );
      }}
    />
  );
}
```

## Compose

Rules:

- Group with a Frame (`group-in-frames`): Put related panels in one `Frame` with its header and footer outside the panels, and keep a plain `Card` for one block of content.
- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/overflow-list
```

It adds 32 registry items: 28 files, 5988 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `@phosphor-icons/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Popover](https://gelatinui.com/components/popover.md)
- [Scroll Area](https://gelatinui.com/components/scroll-area.md)

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Breadcrumb](https://gelatinui.com/components/breadcrumb.md)
- [Popover](https://gelatinui.com/components/popover.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves through the visible items that take focus, then to +N. |
| Enter, Space | Opens the popup with the rest. |

## Accessibility

The +N button says how many items are hidden.

An item that takes focus keeps it when it folds.
