Navigation 2 is a floating icon toolbar that expands into a content panel: click an icon and a card springs open above the toolbar, aligned to the active icon, showing that item's content. Click again or click outside to collapse. Items, icons, and panels are all data driven. Built with Framer Motion and React. Works as a dock for quick actions in apps and dashboards.
Installation
Install dependencies.
Copy and paste the following code into your project.
Unlock the full library
Get all pro blocks, components & illustrations, and production-ready Next.js + Tailwind templates.
Update the import paths to match your project setup.
Usage
import { ExpandableToolbar } from "@/components/pro/blocks/navigation-2";
import { Folder, MessageCircle, User, WalletCards } from "lucide-react";Basic Usage
const items = [
{
id: 1,
label: "User",
icon: <User className="size-4.5" />,
content: <p>Profile panel body</p>,
},
{
id: 2,
label: "Messages",
icon: <MessageCircle className="size-4.5" />,
content: <p>You have 3 new messages.</p>,
},
{
id: 3,
label: "Documents",
icon: <Folder className="size-4.5" />,
content: <p>Project_Proposal.pdf</p>,
},
{
id: 4,
label: "Wallet",
icon: <WalletCards className="size-4.5" />,
content: <p>Balance: $1,250.32</p>,
},
];
<ExpandableToolbar items={items} />;Click an icon to expand the panel; click it again (or click anywhere outside) to collapse. The panel width is locked to the toolbar width so it never overflows the icons.
API
<ExpandableToolbar>
| Prop | Type | Default | Description |
|---|---|---|---|
items | ToolbarItem[] | — | Array of toolbar items to render. |
className | string? | — | Extra classes on the root. |
ToolbarItem
| Field | Type | Description |
|---|---|---|
id | number | string | Unique identifier for the item. |
label | string | Accessible label for the icon button. |
icon | ReactNode | Icon rendered inside the toolbar button. |
content | ReactNode | Panel content shown when the item is open. |
Related blocks
- Navigation 1
A corner hamburger toggle that springs into a full-screen violet menu with staggered links, socials, and a contact CTA.
- Navigation 10
A rounded navbar with ridge shadows and dual-column mega-menu dropdowns featuring a blog panel, directional panel transitions, and a mobile accordion.
- Navigation 3
A full-screen nav that slides in with a liquid 50vw border-radius reveal and staggered oversized links.
- Navigation 4
A Mintlify-style navigation dropdown with a sliding highlight pill and directional slide animations between tab panels.
