kemiljk

Nav

Navigation

About

An accessible navigation list that renders a real nav landmark with ul/li/a markup and marks the active link via aria-current, needing no client-side JavaScript.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Nav to your project and fits it to your theme.

Code

How Nav is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { Nav, NavLink } from "@/components/ui/nav";

/** hrefs here are illustrative, not real routes — this demo shouldn't
 * actually navigate away from the page it's embedded in. */
function preventDemoNavigation(event: React.MouseEvent) {
  event.preventDefault();
}

export default function NavDemo() {
  return (
    <Nav aria-label="Docs">
      <NavLink href="/" onClick={preventDemoNavigation}>
        Overview
      </NavLink>
      <NavLink
        href="/components/"
        aria-current="page"
        onClick={preventDemoNavigation}
      >
        Components
      </NavLink>
      <NavLink href="/theming" onClick={preventDemoNavigation}>
        Theming
      </NavLink>
      <NavLink href="/changelog" onClick={preventDemoNavigation}>
        Changelog
      </NavLink>
    </Nav>
  );
}

More by kemiljk

View all
  • Switch

    Switch

    10
  • Color Picker

    Color Picker

    6
  • Combobox

    Combobox

    1
  • Label

    Label

    1
  • Resizable

    Resizable

    1
  • Hover Card

    Hover Card

    1
  • Progress

    Progress

  • Navigation Menu

    Navigation Menu

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    162
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    427
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    27
  • Sidebar

    Sidebar

    441
  • Tabs

    Tabs

    38
  • Footer Section

    Footer Section

    2
  • Sidebar

    Sidebar

    366
  • Pagination

    Pagination

    119