Dock Navigation
A fully reusable, production-grade Dock Style Navigation Component inspired by the macOS dock interaction system. Features smooth cinematic motion, fluid hover scaling, and clean architecture.
uiframer-motionlucide-react
Installation
$npx futureuikit add dock
Import
import { Dock } from "@/components/ui/dock"
Layout Variant
Color Theme
Theme
Layout
Shape
Spacing
Named Keys & Props
Pass these exact named keys as props on <Dock />. Click any color pill to copy the prop.
colorDefault is "default"(Black & White)variantVisual style"solid""outline""ghost""link"themeSurface theme"default""modern""clean""futuristic""brutal""halftone""macos"shapeCorner shape"default""square""rounded""sharp"spacingInner spacing"default""2x""4x""6x""8x"Usage Example
A basic implementation example to get you started.
Example Implementation
import { Dock, DockItem, DockDivider } from"@/components/ui/dock";
import { Home, Search, Settings, User } from"lucide-react";
export default function Example() {
return (
<Dock>
<DockItem label="Home"href="/">
<Home size={20} />
</DockItem>
<DockItem label="Search"href="/search">
<Search size={20} />
</DockItem>
<DockDivider />
<DockItem label="Profile"href="/profile">
<User size={20} />
</DockItem>
<DockItem label="Settings"onClick={() => alert("Settings")}>
<Settings size={20} />
</DockItem>
</Dock>
);
}Features
Key capabilities and highlights.
Key Capabilities
- ◆Built with Framer Motion for premium physics-based scaling.
- ◆Cinematic wave effect that scales nearby items based on cursor proximity.
- ◆Supports both internal Next.js routing and external links.
- ◆Includes Classic macOS style and Divided Dock variants.
- ◆Fully responsive and gracefully handles mobile touch interactions.
- ◆Extensively customizable physics, gaps, sizes, and colors.
Notes
Important implementation details to consider.
Implementation Details
- ◆Install: Run'npx futureuikit add dock'to add the dock component and Framer Motion dependency.
- ◆Import:'import { Dock, DockItem, DockDivider } from "@/components/ui/dock";'
- ◆Setup: Wrap your items in the'<Dock>'provider container.
- ◆Variants: Pass'variant="modern"'(default),'"clean"', or'"interactive"'to <Dock> to change its style and physics.
- ◆Items: Use'<DockItem>'for individual links or buttons. Pass'label'for tooltips and'href'for links.
- ◆Dividers: Insert'<DockDivider />'anywhere in the list for separated sections.
- ◆Controls: Tweak'magnification'and'distance'props on the main Dock component.