Loading preview
Animated Card
CardsA card that tilts in 3D toward the pointer with spring physics.
A row of icons that magnify as the mouse approaches, like the macOS dock.
npx shadcn@latest add @venusui/dockRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/dock.tsxThe code behind the preview above.
dock-demo.tsx
import { Calendar, Folder, Home, Mail, Search, Settings } from "lucide-react"
import { Dock } from "@/components/ui/dock"
export default function DockDemo() {
return (
<Dock
items={[
{ label: "Home", icon: <Home />, href: "#" },
{ label: "Search", icon: <Search />, href: "#" },
{ label: "Mail", icon: <Mail />, href: "#" },
{ label: "Calendar", icon: <Calendar />, href: "#" },
{ label: "Files", icon: <Folder />, href: "#" },
{ label: "Settings", icon: <Settings />, href: "#" },
]}
/>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| items | { label: string; icon: ReactNode; href?: string; onClick?: () => void }[] | — | Dock items. Each becomes a link (with href) or a button. Required. |
| size | number | 40 | Item size at rest, in pixels. |
| magnification | number | 64 | Item size right under the pointer, in pixels. |
| distance | number | 140 | How far, in pixels, the magnification reaches. |
| label | string | "Dock" | Accessible name for the navigation. |
| className | string | — | Classes for the dock bar. |
Only the props above.
motion package. The CLI installs it.fixed inset-x-0 bottom-4 flex justify-center.nav list; each item is a named link or button with a tooltip on hover and focus.overflow-hidden from its container.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A card that tilts in 3D toward the pointer with spring physics.
Tabs with a sliding underline and fading panels, following the WAI-ARIA tabs pattern.
A lens with a working iris: blades close to the chosen aperture and snap shut when you release the shutter.