React Interactive Dock – macOS-Style Magnification Toolbar
Interactive magnification dock component for React with Gaussian pointer falloff, spring scaling, roving keyboard focus, and spatial tick audio.
Live vector preview rendered straight from the same 120 Hz spring engine—no heavy GIF compression artifacts, zero layout shift.
Customization playground
Tune outline, fill, accent, text colour, and shadow direction live above. The snippet updates automatically for copy-and-paste.
Customize
<ResizableDock />Installation
Install directly into your project source with the Kipluo CLI (React/Tailwind v4) or add the matching Flutter package.
Install
$ npx kipluo add resizable-dockWorking code example
import { ResizableDock } from "@/components/kipluo/resizable-dock";
export function AppDock() {
return (
<ResizableDock
items={[
{ id: "home", label: "Home" },
{ id: "search", label: "Search" },
{ id: "inbox", label: "Inbox" },
{ id: "settings", label: "Settings" },
]}
onSelect={(id) => console.log("Open:", id)}
/>
);
}What Resizable Dock does
- Computes continuous horizontal pointer distance across dock items using a smooth Gaussian bell curve so neighbors scale harmoniously.
- Integrates each icon's target size through spring physics so entering, sweeping across, and leaving the dock feels fluid at 60–120 Hz.
- Implements roving tabindex and ArrowLeft/ArrowRight navigation inside role='toolbar' for keyboard users.
Accessibility & sound behavior
Keyboard & screen readers: role="toolbar". Arrow Left / Right move focus and lift the active icon.
Reduced motion: Automatically respects prefers-reduced-motion: reduce by snapping spring targets immediately without jarring travel.
Sound cues: Pitched ticks as your pointer sweeps icons and a crisp pop when an icon poofs out. Disable per instance with sound={false} or globally via setSoundEnabled(false).
API reference
itemsDockItem[]- Dock items to display. Default
5 icons. soundboolean- Plays this component's sounds. The global switch setSoundEnabled(false) silences every component. Default
true.
Framework compatibility
| Platform / Tool | Status | Details |
|---|---|---|
| React 18 & 19 | Full support | Zero peer runtime lock-in beyond @kipluo/core. |
| Next.js App Router | Full support | Ships with 'use client' boundaries; SSR-safe hydration. |
| Vite / Remix / Astro | Full support | Standard ESM TypeScript source files you own. |
| Tailwind CSS v4 & shadcn/ui | Native | Inherits CSS variables and installs via shadcn registry or CLI. |
| Flutter (Dart) | Native package | Matching spring physics, themes, and PCM audio in packages/flutter/kipluo. |
Build it yourself: related tutorials
All tutorials →How to Make an Interactive Dock in React
Build a smooth magnification dock in React using Gaussian pointer distance falloff, spring scaling, and accessible roving-tabindex keyboard toolbar navigation.
How to Implement Spring Physics Without a Heavy Animation Library
Write a rock-solid 45-line semi-implicit Euler spring engine in TypeScript with fixed 120 Hz sub-stepping, zero dependencies, and true velocity preservation.
How to Build a Magnetic Button in React
Step-by-step guide to building a smooth, interruptible magnetic button in React using Pointer Events, requestAnimationFrame, and a lightweight spring integrator.
Related components
- Open component →Expandable Search PillFree
Compact search icon button that springs open into a focused query pill with clear button pop and Escape dismissal.
- Open component →Spring Drawer HandleFree
Pullable sheet handle with rubber-band overscroll, three magnetic snap detents (Peek, Half, Full), and a velocity-projected throw that settles with a soft click on every lock.
- Open component →Command Palette MotionPaid
Quick command switcher with a velocity-stretched active highlight pill that glides between filtered commands.
- Open component →Magnetic FAB ClusterPaid
Floating action button that fans out a radial arc of sub-actions on bouncy springs, and subtly pulls hovered orbs toward the pointer.
- Open component →Magnetic SurfaceFree
Pulls its child toward the pointer with nonlinear strength, subtle 3D tilt and a soft center snap, then springs home when the pointer leaves.
- Open component →Elastic AccordionFree
Accordion panels that open on a spring (a touch of overshoot, then settle), with a chevron that turns on the same spring. One-at-a-time or many-open.