Skip to content

DockPro

A floating tool dock: a label glides between items, a tint springs to the chosen tool, groups grow a tray and items reorder with Alt + arrows.

oxyn add dock
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Tools or modes switched all day: canvas tools, agent views, quick actions.

When not to use

  • The app frame: use App shell instead.
  • A main action with a menu of alternatives: use Split button instead.
  • An app sidebar: use Sidebar instead.

Installation

Dock is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add dock

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Tools

A canvas tool dock with a group tray.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Magnify

macOS-style magnify (Oxyn plus).

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Vertical

Vertical dock on the left edge (Oxyn plus).

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

Dock

PropTypeDefaultDescription
itemsrequiredVec<DockItem>—Items.
valueOption<String>Default::default()Selected id.
labelString"Tools"Toolbar label.
magnifyboolDefault::default()Magnify on hover.
reorderboolDefault::default()Allow Alt + arrows to reorder.
positionString"bottom"`bottom` · `left`.
on_changeEventHandler<String>—Chosen.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
← →Along the dock (or inside a tray)
EnterorSpaceChoose; on a group, toggle its tray
↑Open a group's tray
↓orEscapeClose the tray
Alt← →Move the focused item

Accessibility

  • toolbar with roving tabindex; plain items use aria-pressed.
  • Groups have aria-haspopup, aria-expanded and aria-controls; closed trays are inert.
  • Names include the shortcut and badge (“Pen, P”).
From the spec

toolbar with roving focus; names include shortcut and badge (“Pen, P”; “Shapes: Ellipse, O, selected”).

Motion & interaction

A label glides between items on hover and focus; the tint springs to the chosen item; a group’s glyph crossfades when its member changes; trays grow out of the dock with members staggering in.

Timing
TransitionDurationEasingReduced motion
Label120 ms fadelinearinstant
Tint260 msovershootinstant
Tray220 ms + 30 ms staggerease.outinstant

Responsive behaviour

  • The floating label shows on hover and focus, not touch.
Edge cases (spec)

Labels never show on touch. Closed trays are inert. Reorder keeps an open tray attached to its group.

Notes for AI

  • Import Dock from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: DockEl in oxyn_gpui.
  • Props to set first: items.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI