To
Go to
A line of destinations. Current is full ink.
Moves between primary destinations. Horizontal links; the current page is full ink.
Go to
A line of destinations. Current is full ink.
Three ways in. They share one source, so the pixels match whichever you pick.
npm install @noorddev/vlak-react
// once, next to your app's root
import "@noorddev/vlak-react/css";
import { NavigationMenu } from "@noorddev/vlak-react";Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/navigation-menu.
npx @noorddev/vlak-cli add navigation-menu
The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.
npx shadcn add https://vlak.dev/r/navigation-menu.json
The same registry item, installed by shadcn's CLI.
<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />
No React. Link vlak.css and use the markup and classes below.
import { NavigationMenu } from "@noorddev/vlak-react";
<NavigationMenu
aria-label="Primary"
items={[
{ label: "Overview", href: "/", current: true },
{ label: "Docs", href: "/docs" },
{ label: "Changelog", href: "/changelog" },
]}
/>Links in a row; the current page is ink.
| Prop | Type | Default | Description |
|---|---|---|---|
itemsrequired | { label: ReactNode; href: string; current?: boolean; }[] | ||
aria-label | string | "Primary" | Landmark name; pages carry several navs. |
Also accepts HTMLAttributes<HTMLElement>.
| Keys | Does |
|---|---|
| Tab | Moves between the links |
| Enter | Follows the link |
<nav class="rs-nav"><a href="#" aria-current="page">Overview</a><a href="#">Docs</a><a href="#">Changelog</a></nav>