Command Palette

Search for a command to run...

Docs
Dock Navbar

Dock Navbar

An animated, floating navigation bar inspired by the magnification and playful motion of the macOS dock.

Installation

Usage

import DockNavbar from "@/components/veltrixui/dock-navbar";
import { Home, Compass, Layers3, Sparkles } from "lucide-react";
 
const items = [
  { label: "Home", href: "/", icon: Home },
  { label: "Explore", href: "/explore", icon: Compass },
  { label: "Templates", href: "/templates", icon: Layers3 },
  { label: "Resources", href: "/resources", icon: Sparkles },
];
 
export default function App() {
  return (
    <DockNavbar
      brand="Acme"
      items={items}
      activeHref="/explore"
      actionLabel="Get started"
      actionHref="/signup"
    />
  );
}

Props

PropTypeDefaultDescription
brandstring"veltrix"Brand label shown at the start of the dock
itemsDockNavbarItem[]Default linksNavigation links with a label, href, and Lucide icon
activeHrefstringFirst itemURL used to highlight the active item
actionLabelstring"Get started"Optional trailing call-to-action label
actionHrefstring"#get-started"Call-to-action destination
classNamestring-Additional classes for the dock container

Each item accepts label, href, and icon (a Lucide icon component).

Features

  • Dock magnification: the hovered or focused icon grows, with neighboring icons receiving a smaller lift.
  • Spring motion: uses Motion for a soft, responsive scale and lift.
  • Active location: a moving indicator marks the active destination.
  • Flexible navigation: provide your own links, icons, brand, and CTA.
  • Responsive layout: labels stay available to assistive technology while the compact icon dock fits smaller screens.
  • Theme aware: uses semantic foreground, border, and surface colors for light and dark themes.
  • Reduced motion: magnification and lift are disabled when the user prefers reduced motion.