MotionClient component
Elastic Dock
Navigation items grow with pointer proximity and move their neighbors with spring motion.
Move across the dock or tab through its actions
Home
Move across the dock or use your keyboard
Usage
tsx
import { ElasticDock } from "@/components/effects/elastic-dock"
<ElasticDock items={[
{ label: "Home", icon: <span>H</span>, href: "/" },
{ label: "Projects", icon: <span>P</span>, href: "/projects" },
]} />API reference
| Prop | Type / default | Description |
|---|---|---|
| items | DockItem[] | Unique labels, icons and either href links or onClick actions. Native keyboard navigation is preserved. |
Use className to adjust layout and styling. New effects respect system reduced-motion preferences and the preview motion setting.