Documentation

Everything you need to know about NavCN and how to use it in your projects.

Introduction

NavCN is a navigation component registry built for modern React and shadcn projects. It provides a curated collection of production-ready navbar components that you can browse, preview, and install directly into your project.

Unlike traditional component libraries, NavCN components are installed as source code — not as a package dependency. When you install a component, the full source is added to your project and you own it completely.

NavCN is built on top of the shadcn registry ecosystem. Components are installed using the shadcn CLI.

Why NavCN?

Building navigation components from scratch is time-consuming. The common workflow without NavCN looks like:

  1. Search the internet for a navbar design
  2. Find a random code snippet
  3. Copy incomplete code
  4. Fix broken imports and missing dependencies
  5. Make it responsive
  6. Add dark mode support
  7. Finally customize it for your project

NavCN simplifies this to: Browse → Preview → Install → Customize.

Every component is responsive, accessible, dark-mode compatible, and built with Tailwind CSS and motion for smooth animations.

Installation

NavCN uses the shadcn CLI to install components. Make sure you have a project with shadcn/ui configured.

Prerequisites

  • Next.js or React project
  • Tailwind CSS configured
  • shadcn/ui initialized (npx shadcn@latest init)

Initialize shadcn (if not already)

$npx shadcn@latest init

Adding Navbars

Install any NavCN component using the shadcn CLI with the component's registry URL:

Minimal Navbar

$npx shadcn@latest add https://navcn-phi.vercel.app/r/minimal-navbar.json

Flip Hover Navbar

$npx shadcn@latest add https://navcn-phi.vercel.app/r/flip-hover-navbar.json

Full Page Navbar

$npx shadcn@latest add https://navcn-phi.vercel.app/r/full-page-navbar.json

What happens after installation?

  • The component source code is added to your project at components/navbars/[component-name].tsx
  • Required npm dependencies are installed automatically
  • You can import and use the component immediately

Using the component

import MinimalNavbar from "@/components/navbars/minimal-navbar";

export default function Layout() {

return (

<MinimalNavbar />

);

}

Customization

Because the component source lives in your project, you can customize it however you like:

  • Change colors — modify Tailwind classes or CSS variables in the component
  • Modify layout — add or remove navigation items, change spacing, rearrange elements
  • Adjust animations — tweak duration, easing, and spring values using the motion props
  • Add your own content — replace placeholder links and brand names with your own

Dependencies

NavCN components use the following libraries. These are installed automatically by the CLI:

PackagePurposeNote
motionAnimationsImport from motion/react
lucide-reactIconsUsed in most components
next-themesDark modeSome components use ThemeToggle

Important: All NavCN components import animations from motion/react (the motion package), not framer-motion. Do not mix the two.

Navbar List

Registry Architecture

NavCN follows the shadcn registry spec. Each component has a JSON registry file hosted at:

https://navcn-phi.vercel.app/r/[component-slug].json

These JSON files describe the component's files, dependencies, and registry dependencies. The shadcn CLI reads these files to install components correctly.

The @navcn namespace in the shadcn registry is a planned future goal. Currently, components are installed using the full URL. Once officially submitted to the shadcn registry, installation will work via shorthand:

npx shadcn@latest add @navcn/minimal-navbar# future goal