Oola Dock

VdDock places navigation on any screen edge and animates between horizontal and vertical layouts. Use the customizer to try placement, tint, radius, and glass strength.

This demo cycles all four edges and allows vertical placement on narrow screens. The package pairs bottom/left and top/right, and uses a horizontal edge at 520px or below. Replace the #brand slot with your logo.

Live customizer

Page-local knobs bound to real VdDock props — they do not write the site theme. Click ū (or your chosen brand) to cycle bottom → left → top → right. The brand mark spins on hover and while the dock morphs. Auto layout shows labels on horizontal edges and icon-only items on vertical edges. Full screen expands this playground only (not the browser).

Place
Color
Tint mode
Radius
Glass
Brand
Icons
Swatches
Open Color tints
Surface vs accent tint

tintMode decides what :tint paints. surface (the default, left) washes the pill itself. accent (right) holds the pill at constant ink and uses --vd-dock-tint to color the active item icon and the #brand slot while the glass stays neutral. That is what this site's own dock uses — chrome that sits over changing page content reads better when only the icons move with the theme.

Fixed app chrome

position="fixed" pins to the viewport like oolasite. Default edge is placement="bottom". Offset your main with --vd-dock-height and --vd-dock-inset. Use :menu="false" on VdThemeSwitcher so the menu cannot clip under the pill.

VdDock API
Prop / slotNotes
v-model:orientation"horizontal" | "vertical". Brand click morphs through a square waypoint (377ms / 610ms) on the current pair.
v-model:placement"bottom" | "top" | "left" | "right" (default bottom). Source of truth for the edge. Pairs: bottom ↔ left, top ↔ right.
:position"fixed" (viewport chrome, default) | "contained" (absolute in a relative parent — use this in docs and cards). Fixed docks force a horizontal edge at ≤520px; this playground lifts that JS lock.
:darkAlways-dark near-black frost (default true).
:tintOptional Open Color wash: red | orange | yellow | green | teal | blue | violet | pink.
:tintMode"surface" (default) paints the pill with :tint. "accent" holds the pill at constant ink and colors the active item icon and the #brand slot through --vd-dock-tint. No effect without :tint.
:glassSeemore step 1 | 2 | 3 | 5 | 8 | 13 | 21 | 34 (default 34).
:radiusDock-own scale — not theme RadiusOption (max 0.5). 0.5 | 0.75 | 1 | 1.25 (default) | 1.5 | 2 | 9999 (pill). Sets --vd-dock-radius.
:itemLayout"stack" icon-above-label (default) | "inline" icon-then-label | "auto" (inline on horizontal edges, icon-only stack with tooltips on vertical edges).
:brandSpinboolean (default false). Wraps #brand in .vd-dock-brand-spin and continuously spins it on hover, focus, and while morphing, then eases back upright to 0deg.
:brandCorner"mirror" (default, flips brand to the far corner on top/right edges) | "consistent" (keeps brand at the leading left/top corner on every edge).
:brandTogglesBrand click toggles the paired edge (default true). The package disables this at ≤520px on fixed chrome; this playground opts out.
:cycle"pair" (default) keeps bottom ↔ left / top ↔ right. "edges" walks bottom → left → top → right → bottom. This playground uses edges.
:persistOpt-in. Writes getStoragePrefix() + "dock-orient" as the placement string. Default false.
:storageKeyCustom localStorage key when :persist="true" (defaults to getStoragePrefix() + "dock-orient").
:labelaria-label for the nav (default "Primary").
#brandMorph-origin corner. Demos use ū; swap any icon or wordmark. Bottom/left: brand left or bottom. Top/right: brand right or top (unless brandCorner="consistent").
defaultItems — VdDockItem or any .vd-dock-item.
#actionsTrailing controls (e.g. VdThemeCustomizer variant="swatches" and VdThemeSwitcher :menu="false").
VdDockItem API
PropNotes
:iconPhosphor name via VdIcon. Omit for a label-only item.
:labelVisible label and accessible name.
:activeAdds .is-active and aria-current="page".
:activeIconFillboolean (default true). Renders the filled Phosphor icon variant when :active is true.
:tooltipstring | boolean. When true, uses :label; when a string, uses that custom text; when omitted inside a dock with itemLayout="auto", automatically shows :label on vertical edges (left/right) using the .vd-tooltip-dock variant.
:badgestring | number. Optional notification badge rendered in .vd-dock-badge.
:hrefstring. When set, renders an <a> link instead of a <button> (unless overridden by :as).
:asstring. Custom element or component tag (defaults to "a" when :href is passed, otherwise "button").

Dock items with tooltips automatically apply data-tooltip-variant="dock" (styled by .vd-tooltip-dock) and position the bubble away from the active dock edge.

useDockOrientation & useDockBrandSpin API
useDockOrientation(options?)
MemberNotes
OptionsUseDockOrientationOptions: { narrowQuery?: string, persist?: boolean, storageKey?: string, initial?: DockOrientation, initialPlacement?: DockPlacement }.
State refsplacement (Ref<DockPlacement>), orientation (Ref<DockOrientation>), visualPhase (Ref<'horizontal' | 'square' | 'vertical'>), isMorphing (Ref<boolean>), isNarrow (Ref<boolean>).
Computed helpersdockClasses (is-horizontal, is-square, is-vertical, is-morphing, vd-dock-edge-*), orientClass, brandLabel, brandPressed, canToggle.
Methodstoggle(), playTo(orientation), playToPlacement(placement, { interrupt? }), snapTo(orientation), snapToPlacement(placement).
Exported helpers & constantsdockOrientationOf(placement), dockHorizontalOf(placement), dockPlacementOf(orientation, from), DOCK_PLACEMENTS, DOCK_PLACEMENT_PAIR, DOCK_MORPH_MS, DOCK_NARROW_QUERY, DOCK_ORIENT_SUFFIX, DOCK_TINTS, DOCK_TINT_MODES, DOCK_GLASS_STEPS, DOCK_RADIUS_OPTIONS.
useDockBrandSpin(dockEl, enabled)
MemberNotes
useDockBrandSpin(dockEl, enabled)Composable that observes .vd-dock-brand pointer/focus events and dock .is-morphing state to animate .vd-dock-brand-spin via Web Animations API.
ensureDockBrandSpin(spinEl, durationMs)Starts or updates a continuous 360deg rotation on --vd-dock-brand-angle from the current angle.
settleDockBrandSpin(spinEl, reducedMotion?)Coasts the brand mark from its current --vd-dock-brand-angle back to 0deg upright (or snaps immediately when reducedMotion is true).
ConstantsDOCK_BRAND_ANGLE_VAR (--vd-dock-brand-angle), DOCK_SPIN_HOVER_MS (5000), DOCK_SPIN_MORPH_MS (900), DOCK_SPIN_SETTLE_MIN_MS (600), DOCK_SPIN_SETTLE_MAX_MS (1800).
Accessibility
  • Renders a semantic <nav :aria-label="label"> landmark (defaults to "Primary").
  • Active VdDockItem elements set aria-current="page" and always carry :aria-label="label" so icon-only vertical docks remain fully labeled for screen readers.
  • The #brand corner button exposes :aria-pressed="brandPressed" (true when vertical), an orientation-aware aria-label ("Use vertical dock" / "Use horizontal dock"), and aria-disabled="true" when toggling is disabled or locked on narrow viewports.
  • Honors prefers-reduced-motion: reduce: orientation changes skip the square morph timers via snapToPlacement(), and settleDockBrandSpin() immediately snaps --vd-dock-brand-angle to 0deg.