AppDock
A floating macOS-style dock — a glass navigation pill pinned to any edge. Drag it between edges with a live preview, and it glides into place.
Install: pnpm add-component AppDock
Live dock
A screen of its own, with a real dock inside it. Drag the grip to any edge — nothing re-docks mid-drag, the bar rides the cursor while a ghost shows where it will land. Inbox carries a badge, Search is an action item, Archive is disabled.
Basic usage
Four items, no options. The dock is fixed-position and renders outside the content flow, so it goes in your layout rather than a page. Hues name your own semantic tokens, so it follows a theme swap with everything else.
Two docks, one page
scope="container" pins the dock to its containing block instead of the screen, measures the drag edges against that box, and keeps its edge private to the instance — so several can coexist. Drag one and the other stays put.
Sections and roles
Sections render with a separator between them. Items with a `roles` array are hidden unless the `role` prop matches — items without one are always visible.
Reserving space in the viewport layout
A viewport dock floats, so the content column has to reserve room on the same edge. Bind CONTENT_CLEARANCE to the preview position rather than the committed one, and the whole page previews the move while a drag is in flight.
API
items(DockItem[] | DockSection[]): Required. A flat list, or sections that render with a separator between them. Each item needs a label and an icon; to, hue, roles, onClick, badge, exact and disabled are optional. An item with no `to` renders as a button.role(string | null): Filters items carrying a `roles` array. An item with no `roles` is always visible; an item with `roles` is visible only when this matches one of them.scope('viewport' | 'container'): 'viewport' pins the dock to the screen and persists its edge. 'container' pins it to the nearest positioned ancestor, measures drag edges against that box, and keeps its edge private — so several can coexist. Read once at setup.position(DockPosition): Optional v-model:position. Leave it off and the dock owns its edge. DockPosition is 'bottom' | 'left' | 'top' | 'right', which is also the grip's cycle order.edges(DockPosition[]): Edges the dock may occupy. Narrow it to pin the dock down — a single edge also hides the grip, since there is nowhere to move it to.size('sm' | 'md' | 'lg'): Tile scale — 2.25 / 2.75 / 3.25rem. The grip and the icons follow it.lift(number): Hover lift in rem. 0 disables it; immediate neighbours get a third of it. Never a scale — a tile that grows resizes its slot and shoves the row around.storageKey(string): Where a viewport dock persists its edge. Ignored when scope is 'container'.ariaLabel(string): Accessible name for the underlying <nav>.