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>
);
}
















