Navbar
A product header with a place for your brand, routes and actions. A disclosure on smaller screens.
Interactive preview
Usage
import { Navbar } from "@devvy-ui/react";
<Navbar label="Product" brand={<a href="/">Orbit</a>}>
<a href="/overview" aria-current="page">Overview</a>
<a href="/projects">Projects</a>
</Navbar>API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | required | Accessible name of the navigation. |
| brand | ReactNode | required | Your logo or home link. |
| actions | ReactNode | — | Account, search or other actions. |
| children | ReactNode | — | Native route links; aria-current on the active link. |
| menuLabel | string | Menu | Visible mobile toggle label. |
Accessibility & behavior
Platform Behavior & Guidelines
Normal Tab and link behavior. Below 40rem, a native button toggles the route disclosure. Escape closes it and returns focus. Desktop links are always visible. This is navigation, not an ARIA menu; it does not impose a router, intercept links or trap focus.
Source ownership
Add the audited implementation directly into your repository with the CLI:
node /path/to/devvy-ui/packages/cli/src/cli.mjs add navbarMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.