Split Nav - React Component | Kokonut UI
Split Nav
Navigation bar that splits around the active link, with drag-to-scrub, flick projection and an optional compact fold.
Installation
Split Nav is a free, open-source React component in the Kokonut UI Navigation collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/morphic-navbar.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/morphic-navbar
Or add it by hand: install its packages, then copy the source from above into components/kokonutui/morphic-navbar.tsx.
npm install motion
Usage
import MorphicNavbar from "@/components/kokonutui/morphic-navbar";
export default function Example() {
return <MorphicNavbar />;
}
Props
items
Record<string, NavItem> Default built-in
Links keyed by their href, in display order.
defaultPath
string
Initially active path. Defaults to the first item's path. When an item's path matches the current route, that item is active instead.
compact
boolean Default false
After 80px of page scroll, fold the bar down to the active link plus a chevron that opens it again.
className
string
Extra classes for the root element.
NavItem
name required
string
Dependencies
| Needs | Version | Comes from |
|---|---|---|
motion |
^12.23.25 |
npm, installed by the CLI |
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.
On this page
No Headings
- 150+ components and templates for AI products
- Works with Claude Code, Cursor and more
- One command installation with shadcn/cli