v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS
NavigationMenu
Disclosure navigation with ordinary links.
Interactive preview
Usage
import { NavigationMenu } from "@devvy-ui/react";
<NavigationMenu label="Resources" items={[{label:'Documentation',children:[{label:'Getting started',href:'/ui/getting-started'}]}]} />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| items | {label,href?,children?}[] | required | Links or disclosure groups. |
| label | string | required | Navigation landmark name. |
Accessibility & behavior
Platform Behavior & Guidelines
Native details/summary keeps links available to keyboard and touch without applying application-menu roles to site navigation. Unsafe URL schemes are removed.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add navigation-menuMake 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.
NavigationMenu.tsxREACT / TSX
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.