devigner.ComponentsMenu Dock

NewNavigation · added Sep 21

Menu Dock

A dock that grows into its own menus, nested as deep as you need.

Install it in one line

$npx devignerui add menu-dock

Writes components/ui/menu-dock.tsx and lists what it needs.

First time here

$npx devignerui init

Or by hand

  1. Needs React 18+ and Tailwind CSS v4.
  2. Install the dependencies.

    $npm i cn motion @devigner-ui/icons devignerui
  3. Paste the source from into components/ui/menu-dock.tsx.

Usage

<MenuDock items={items} />

Custom composition

<MenuDock items={items} renderIcon={({ defaultIcon }) => <span>{defaultIcon}</span>} />

Every prop

items-
MenuDockItem[]

Dock items.

active-
string

Active item ID.

path-
number[]

Controlled path.

onNavigate-
function

Path callback.

renderIcon-
function

Icon slot.

classNames-
MenuDockClassNames

Slot classes.

slotProps-
MenuDockSlotProps

Slot attributes.

Notes

It's your code now. Edit it however you like. If something breaks in your setup, the registry has the latest version.

Some of these designs take cues from interfaces we've admired around the web. If one started as your idea and you'd like credit, message us on X @devignerui and we'll add it.