Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Nexus floating dock, animated React component

A macOS-style dock: tiles swell under the pointer and push their neighbours aside on springs, a tooltip names each one, and a click bounces the tile like a launching app before a running dot slides under it. Below md it turns into one glass button that springs the tiles up as a stack.

  • Free
  • Navbars
  • Hover
  • Spring

Like Nexus floating dock? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Nexus floating dock stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Props

PropTypeDefaultWhat it does
items—Tiles: { title, icon, href, tint?, badge? }. tint is any CSS colour or gradient; with it the icon turns white.
position"fixed"fixed pins the dock to the bottom of the viewport; inline renders it where you place it. Both switch to the compact menu below md.
activeHref—Href of the item that gets the running dot. Defaults to matching the current pathname.
onSelect—Called with the item when a tile is clicked.
disableLinksfalseRender tiles as buttons instead of links, for in-app actions.
autoplayfalseSweeps an invisible pointer across the dock and bounces a tile until someone points at it.
desktopClassName—Extra classes on the desktop dock wrapper.
mobileClassName—Extra classes on the mobile menu wrapper.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/floating-dock
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    floating-dock.tsx
    floating-dock/
    floating-dock-desktop.tsx
    floating-dock-mobile.tsx
    floating-dock.tsx
    icon-container.tsx
    index.ts
    types.ts
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion lucide-react

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { FloatingDock } from "@/components/floating-dock";
    
    export default function Page() {
      return (
        <main>
          <FloatingDock />
        </main>
      );
    }

Like Nexus floating dock? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Nexus floating dock stays free.

About Nexus floating dock

The Floating Dock is a macOS-style icon bar with magnification spring physics that scales icons based on cursor proximity. As the cursor approaches an icon, it magnifies using Framer Motion spring interpolation, while adjacent icons scale proportionally — the same effect Apple uses in macOS. The dock floats above page content with glass morphism styling. Use it in product demos to showcase a polished navigation metaphor, or as actual application navigation.

Good for

  • App navigation bars
  • macOS-style product demos
  • Portfolio and creative portfolio navigation
  • Interactive landing page elements

Guides