---
title: "Magnifying Dock"
description: "A row of icons that grow and lift toward the pointer, the nearest one most. One name label slides from icon to icon."
url: https://gelatinui.com/components/magnifying-dock
markdown_url: https://gelatinui.com/components/magnifying-dock.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/magnifying-dock"
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Magnifying Dock

> A row of icons that grow and lift toward the pointer, the nearest one most. One name label slides from icon to icon.

Page: https://gelatinui.com/components/magnifying-dock

## When to use it

Best for: A small set of icon actions or links where the swell under the pointer is part of the look.

- Use it for 3 to 10 icon items with short names: apps, tools, or the pages of a site.
- Put a `MagnifyingDockLabel` in each item: it names the item, and the dock shows it in one sliding pill.
- Use `MagnifyingDockLink` with `aria-current="page"` for site navigation.
- Leave about 48px of free room on the far side of the dock for the lift and the name pill.
- Leave `size` unset: the dock takes the small size when it does not fit its parent, as on a phone.

## When not to use it

- For a bar of text buttons that act on a selection, use the [Action Bar](https://gelatinui.com/components/action-bar.md).
- For a plain row of tool buttons with no motion, use a [Toolbar](https://gelatinui.com/components/toolbar.md).

## Notes for agents

- Give the root an `aria-label`, such as "Apps". It is a toolbar: one Tab stop and arrow keys.
- `side` is a physical screen edge: a dock on the left stays on the left in right to left.
- `magnification={1}` keeps the size and only lifts; `reach={0}` swells only the item under the pointer.
- Keyboard focus swells its item too. The items never move, so the row does not shift.
- With no `size`, the dock measures its parent box, never the window: give it a parent with its own width, not a `w-fit` box. A set `size` never changes.

## Anatomy

```text
MagnifyingDock
├─ MagnifyingDockGroup (0..n)
├─ MagnifyingDockItem (0..n)
├─ MagnifyingDockLink (0..n)
├─ MagnifyingDockIcon (0..n)
├─ MagnifyingDockLabel (0..n)
├─ MagnifyingDockIndicator (0..n)
└─ MagnifyingDockSeparator (0..n)
```

## API reference

### MagnifyingDock

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `side` | `"bottom" \| "left" \| "right" \| "top"` | "bottom" | The screen edge the dock sits on (default `bottom`). It sets the axis (`top` and `bottom` are a row, `left` and `right` a column), the side the icons lift away from, and the side of the indicator. The label shows on the far side. Physical: a dock on the left edge stays there in right to left. |
| `size` | `"default" \| "lg" \| "sm"` |  | The item size: `sm` 36px, `default` 44px, `lg` 52px. Unset (the default): `default` while the dock fits its parent box, and `sm` when it does not, as on a phone. Give the dock a parent with its own width (not `w-fit`), so the fit check sees the room. A set size never changes. |
| `magnification` | `number` | 1.32 | The scale of the icon under the pointer (default 1.32). `1` keeps the size; the lift stays. |
| `lift` | `number` | 8 | How far the icon under the pointer moves away from the screen edge, in px (default 8). |
| `reach` | `number` | 2 | How many items on each side also swell, less with each step (default 2: 75%, then 25%). `0` grows only the item under the pointer. |

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

### MagnifyingDockGroup

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |

Also takes every prop of Base UI `Toolbar.Group`: https://base-ui.com/react/components/toolbar

### MagnifyingDockItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |

Also takes every prop of Base UI `Toolbar.Button`: https://base-ui.com/react/components/toolbar

### MagnifyingDockLink

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |

### MagnifyingDockIcon

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

### MagnifyingDockLabel

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

### MagnifyingDockIndicator

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `pulse` | `boolean` |  |  |
| `tone` | `"destructive" \| "info" \| "neutral" \| "success" \| "warning"` |  |  |
| `variant` | `"default" \| "muted" \| "ring"` | "muted" |  |

### MagnifyingDockSeparator

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |

Also takes every prop of Base UI `Toolbar.Separator`: https://base-ui.com/react/components/toolbar

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| MagnifyingDock | `magnifying-dock` |  | `--radius` | `hit-area` |
| MagnifyingDockGroup | `magnifying-dock-group` |  |  |  |
| MagnifyingDockItem | `magnifying-dock-item` | `data-disabled` | `--radius` | `hit-area` |
| MagnifyingDockLink | `magnifying-dock-link` | `data-disabled` | `--radius` | `hit-area` |
| MagnifyingDockIcon | `magnifying-dock-icon` | `aria-current`, `data-emphasis` |  | `motion-timing` |
| MagnifyingDockLabel | `magnifying-dock-label` |  |  |  |
| MagnifyingDockIndicator | `magnifying-dock-indicator` |  |  |  |
| MagnifyingDockSeparator | `magnifying-dock-separator` | `data-orientation` |  |  |

## Usage

Put an icon and a label in each item, and give the root an `aria-label`.

```tsx title="app-dock.tsx"
import { CalendarIcon, EnvelopeIcon, ImageIcon } from "@phosphor-icons/react/ssr";

import {
  MagnifyingDock,
  MagnifyingDockIcon,
  MagnifyingDockItem,
  MagnifyingDockLabel,
} from "@/components/pro/actions/magnifying-dock";

const APPS = [
  { name: "Mail", icon: <EnvelopeIcon /> },
  { name: "Calendar", icon: <CalendarIcon /> },
  { name: "Photos", icon: <ImageIcon /> },
];

export function AppDock() {
  return (
    <MagnifyingDock aria-label="Apps">
      {APPS.map((app) => (
        <MagnifyingDockItem key={app.name}>
          <MagnifyingDockIcon>{app.icon}</MagnifyingDockIcon>
          <MagnifyingDockLabel>{app.name}</MagnifyingDockLabel>
        </MagnifyingDockItem>
      ))}
    </MagnifyingDock>
  );
}
```

## Compose

Rules:

- 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/magnifying-dock
```

It adds 26 registry items: 23 files, 5333 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Dot](https://gelatinui.com/components/dot.md)
- [Separator](https://gelatinui.com/components/separator.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

- [Toolbar](https://gelatinui.com/components/toolbar.md)
- [Speed Dial](https://gelatinui.com/components/speed-dial.md)
- [Action Bar](https://gelatinui.com/components/action-bar.md)
- [Navigation Menu](https://gelatinui.com/components/navigation-menu.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves into the dock and out of it. The dock is one Tab stop. |
| ← → | Moves between the items of a row (`top` and `bottom`), and loops at the ends. |
| ↑ ↓ | Moves between the items of a column (`left` and `right`). |
| Home, End | Moves to the first or the last item. |
| Enter, Space | Runs the focused item. Enter opens a focused link. |

## Accessibility

The dock is a Base UI toolbar: one Tab stop, arrow keys along its axis, Home and End.

Each `MagnifyingDockLabel` stays in its item as the name of the item. The sliding pill is a copy with `aria-hidden`.

Items are 36, 44, or 52px, so the default and large sizes are full touch targets.

## Motion

| Part | Motion |
| --- | --- |
| Swell | statusPop · the icon scales to 1.32 and lifts 8px, its neighbours less |
| Name pill | glide · slides and changes width between items |
| Pill in and out | fade · 150ms in, 90ms out |
| Icon opacity | hover · 150ms · 50% at rest, 100% under the pointer |
| Press | statusPop · the icon sinks to 94% of its swell |
