Skip to content
LSD Framework
Component · primitive

Dock

A launcher tray that bends to the cursor. Items measure their own distance from the pointer and scale accordingly. Anchored bottom, top, or either side — and quietly accessible when motion is muted.

lsd-pointer.js · --dist per item data-anchor · data-magnify ↩ All components
01 · Bottom dock · medium magnifydata-anchor="bottom" data-magnify="md"
02 · Top dock · subtle magnifydata-anchor="top" data-magnify="sm"
03 · Vertical · left sidedata-anchor="left" data-magnify="lg"
canvas
inspector
04 · Magnify off · static traydata-magnify="off"
05 · Container-aware · resize the stagecollapses below 480px
UsageAPI surface

Authoring contract

The host carries .lsd-pointer so lsd-pointer.js auto-attaches and writes --lsd-pointer-x. A tiny script measures each item's centre against the cursor and writes --dist (in item-widths) on it; the CSS rule scales the icon based on --dist and --dock-peak. Tooltips appear on hover or keyboard focus.

HookValuesEffect
data-anchorbottom · top · left · rightAxis + scale origin + tooltip side.
data-magnifyoff · sm · md · lgPeak scale factor. off = no magnification, identical to 0.
data-pinned on itembooleanDot indicator below the icon.
aria-current="true" on itemSame indicator, semantic.
--dock-iconlengthBase icon size. Default 52px.
--dock-gaplengthGap between items.
--dock-peak0..1Direct override of magnification amount.
--dock-reachnumberFalloff radius in item-widths.
prefers-reduced-motionItems stop scaling. Keyboard navigation and tooltips remain.
View dock HTML
<nav class="lsd-dock lsd-pointer" data-anchor="bottom" data-magnify="md">
  <div class="lsd-dock__rail">
    <button class="lsd-dock__item" data-pinned aria-current="true">
      <span class="lsd-dock__icon">L</span>
      <span class="lsd-dock__label">Library</span>
    </button>
    <!-- …more items… -->
  </div>
</nav>
LSD components · Dock · primitive
↩ All components