Calm motion: animations on this site only fade, with no movement
Dock
A strip of app icons that swell under the pointer
A row (or column) of big icon buttons for the handful of places someone returns to: an app launcher, a pinned set of tools, a mobile-style home bar. The icon under the pointer grows and its neighbors follow. The label appears above. For the main navigation of a site use NavigationMenu or BottomTabs, which carry text.
Bottom and side
Opened: nothing yet
itemsare{ id, label, icon?, href?, badge?, disabled? }. An item withhrefis a link, the rest are buttons.selectfires on click.iconis a character or emoji: the#itemslot draws an image or Icon instead.- It is a toolbar with one tab stop. The arrow keys move along the dock (← → on the bottom, ↑ ↓ on the sides, mirrored under RTL). Home and End jump to the first and last item. Disabled buttons are skipped.
labelnames every item, so the growing and the tooltip are decoration. A keyboard-focused item grows as well. positionis the edge it sits on: it sets the direction, where icons grow from and which arrows work.magnification(1.6) is how much the nearest icon grows,radiusthe reach in px.:magnification="1"turns it off. Touch never magnifies, and nor doesprefers-reduced-motion.- Growth is a transform, so nothing around the dock moves.
Usage
ts
import { BlessDock } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
items* | BlessDockItem[] | — | |
position | "left" | "bottom" | "right" | "bottom" | the screen edge it sits on: sets the direction it lays out, grows and is navigated in |
size | number | 44 | px, the resting size of an icon |
magnification | number | 1.6 | how much the icon under the pointer grows; 1 turns the effect off |
radius | number | 110 | px of reach either side of the pointer |
label | string | "Dock" |
Events
| Name | Payload | Description |
|---|---|---|
select | [item: BlessDockItem] |
Slots
| Name | Scope | Description |
|---|---|---|
item | { item: BlessDockItem; } |