Floating Dock
macOS-style dock with spring-scale magnification on hover. Fully keyboard accessible.
Installation
1
Run the CLI
$npx particleui-cli add floating-dock
Usage
TSX
import { FloatingDock } from "@/components/ui/floating-dock"
import { House, BookOpen, CreditCard } from "@phosphor-icons/react"
export default function Example() {
const items = [
{ title: "Home", icon: <House size={18} />, href: "/" },
{ title: "Docs", icon: <BookOpen size={18} />, href: "/docs" },
{ title: "Pricing", icon: <CreditCard size={18} />, href: "/pricing" },
]
return <FloatingDock items={items} />
}Props
| Prop | Type | Default | Required |
|---|---|---|---|
| items | DockItem[] | — | yes |
| className | string | — | no |
| magnification | number | 2.2 | no |
| distance | number | 120 | no |
Details
Source filecomponents/ui/floating-dock.tsx
Typeui
Categoriesnavigation, particles
npm dependencies
Registry deps
Claude skill—