---
title: "Thumb Bar"
description: "A floating tab bar for phone apps. A soft fill stretches from tab to tab, and you can slide your thumb along the bar to pick a tab."
url: https://gelatinui.com/components/thumb-bar
markdown_url: https://gelatinui.com/components/thumb-bar.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/thumb-bar"
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Thumb Bar

> A floating tab bar for phone apps. A soft fill stretches from tab to tab, and you can slide your thumb along the bar to pick a tab.

Page: https://gelatinui.com/components/thumb-bar

## When to use it

Best for: The main views of a phone app: a floating bottom bar with one fill that moves under the current tab.

- Use it for the main views of a phone app.
- Use `render={<a href="/inbox" />}` on each `ThumbBarItem` when a tab is a route, and pass the route value as `value`.
- Use `ThumbBarActions` to give one tab an arc of round actions.

## When not to use it

- For the main navigation of a desktop app, use a [Sidebar](https://gelatinui.com/components/sidebar.md).
- For a list of actions that opens from a button, use a [Menu](https://gelatinui.com/components/menu.md).
- To pick a value with no panel or route, use a [Segmented Control](https://gelatinui.com/components/segmented-control.md).

## Notes for agents

- The source sets no fixed position on the bar. Place it at the bottom of the screen yourself.
- Each `ThumbBarItem` needs a `value`. The bar compares it with its own `value`.
- `onValueChange` runs on a tap, a click, or the end of a scrub.
- The `value` of `ThumbBarActions` must match the `value` of its tab.
- `ThumbBarAction` needs a `label`. The icon goes in `children`.
- `ThumbBarLabel` also feeds the scrub tag, so give each tab one.
- Use `defaultValue={null}` for no current tab. The fill then does not show.

## Anatomy

```text
ThumbBar
├─ ThumbBarItem (0..n)
├─ ThumbBarIcon (0..n)
├─ ThumbBarLabel (0..n)
└─ ThumbBarActions (0..n)
   └─ ThumbBarAction (0..n)
```

## API reference

### ThumbBar

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `string \| null` |  | The value of the current tab (controlled). Pass the route's value for links. |
| `defaultValue` | `string \| null` | null | The first current tab (uncontrolled). |
| `onValueChange` | `function` |  | Called with the value of a tab the person picks: a tap, a click, or the end of a scrub. |

### ThumbBarItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `disabled` | `boolean` | false |  |
| `value` | `string \| (readonly string[] & string)` |  | The value of this tab. The bar compares it with its `value`. |

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

### ThumbBarIcon

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### ThumbBarLabel

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### ThumbBarActions

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `string` |  | The value of the tab that holds these actions. |
| `children` | `ReactNode` |  | The `ThumbBarAction` buttons, placed on the arc in order. |
| `sideOffset` | `number` | 14 | The gap from the bar to the arc, in px. |

Also takes every prop of Base UI `Menu.Root`: https://base-ui.com/react/components/menu

### ThumbBarAction

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `label` | `string` |  | The name of the action, for screen readers and the type-ahead. The icon is the children. |

Also takes every prop of Base UI `Menu.Item`: https://base-ui.com/react/components/menu

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| ThumbBar | `thumb-bar` |  | `--radius`, `--thumb-bar-span`, `--thumb-bar-width`, `--thumb-bar-x` |  |
| ThumbBarItem | `thumb-bar-item` | `data-disabled`, `data-lit` | `--radius` | `motion-timing` |
| ThumbBarIcon | `thumb-bar-icon` |  |  |  |
| ThumbBarLabel | `thumb-bar-label` |  |  |  |
| ThumbBarActions | `thumb-bar-actions` |  |  |  |
| ThumbBarAction | `thumb-bar-action` | `data-disabled`, `data-highlighted` |  | `motion-timing` |

## Usage

Put one `ThumbBarItem` per tab in the bar. The bar sets no position, so place it at the bottom of the screen yourself.

```tsx title="app-tabs.tsx"
import { HouseIcon, TrayIcon, UserIcon } from "@phosphor-icons/react/ssr";

import { ThumbBar, ThumbBarIcon, ThumbBarItem, ThumbBarLabel } from "@/components/pro/navigation/thumb-bar";

export function AppTabs() {
  return (
    <ThumbBar defaultValue="home">
      <ThumbBarItem value="home">
        <ThumbBarIcon><HouseIcon /></ThumbBarIcon>
        <ThumbBarLabel>Home</ThumbBarLabel>
      </ThumbBarItem>
      <ThumbBarItem value="inbox">
        <ThumbBarIcon><TrayIcon /></ThumbBarIcon>
        <ThumbBarLabel>Inbox</ThumbBarLabel>
      </ThumbBarItem>
      <ThumbBarItem value="profile">
        <ThumbBarIcon><UserIcon /></ThumbBarIcon>
        <ThumbBarLabel>Profile</ThumbBarLabel>
      </ThumbBarItem>
    </ThumbBar>
  );
}
```

## Compose

Rules:

- Touch targets (`touch-targets`): Give every control a hit area of at least 44 px on touch screens, even when it looks smaller.
- 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-pro/thumb-bar
```

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

## 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

- [Sidebar](https://gelatinui.com/components/sidebar.md)
- [Segmented Control](https://gelatinui.com/components/segmented-control.md)
- [Menu](https://gelatinui.com/components/menu.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves to the next tab of the bar. |
| Enter, Space | Opens the tab that has focus. |
| Arrow Up | Opens the actions of the tab that has focus. |
| Arrow Left, Arrow Right | Moves between the actions on the arc. |
| Escape | Closes the actions and puts focus back on the tab. |

## Accessibility

Each tab is a button or a link through `render`, so Tab moves through the bar.

Arrow Up opens the actions of a tab, and Escape puts focus back on that tab.

Each `ThumbBarAction` needs a `label`, because it shows only an icon.

## Motion

| Part | Motion |
| --- | --- |
| Actions | fade · 150ms · ease-out (0, 0, 0.2, 1) · the actions pop up on the arc one after the other |
