Put an icon and a label in each item, and give the root an aria-label.
app-dock.tsx
MagnifyingDock
<div>| Prop | Type | Default | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| class | 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. | |||||||
From Base UIToolbar.RootBase UI docs | ||||||||||
| disabled | boolean | — | ||||||||
| loop | boolean | true | If true, using keyboard navigation will wrap focus to the other end of the toolbar once the end is reached. | |||||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | ||||||||
| ||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||
MagnifyingDockGroup
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
From Base UIToolbar.GroupBase UI docs | |||
| disabled | boolean | false | When true all toolbar items in the group are disabled. |
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
MagnifyingDockItem
<button>| Prop | Type | Default | Description | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||
From Base UIToolbar.ButtonBase UI docs | ||||||||||||||
| disabled | boolean | false | When true the item is disabled. | |||||||||||
| focusable | boolean | true | When true the item remains focusable when disabled. | |||||||||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | ||||||||||||
| ||||||||||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | |||||||||||
MagnifyingDockLink
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
MagnifyingDockIcon
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
MagnifyingDockLabel
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
MagnifyingDockIndicator
<div>MagnifyingDockSeparator
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| class | string | — | |
From Base UIToolbar.SeparatorBase UI docs | |||
| orientation | "horizontal""vertical" | — | The orientation of the separator. Defaults to the opposite of the toolbar's orientation, so a horizontal toolbar renders vertical separators. |
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| 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). |
| HomeorEnd | Moves to the first or the last item. |
| EnterorSpace | Runs the focused item. Enter opens a focused link. |
Built with
Installs with Magnifying Dock











