# NavigationMenu

Native links and exclusive details disclosures for site navigation.

[All components](https://rickylabs.github.io/netscript/design-system/components/) · [Theme builder](https://rickylabs.github.io/netscript/create/) · [Implementation source](https://github.com/rickylabs/netscript/blob/main/packages/fresh-ui/registry/components/ui/navigation-menu.tsx)

## Live preview

[Open live navigation-menu preview](https://rickylabs.github.io/netscript/assets/fresh-ui/preview/?component=navigation-menu&theme=studio-utility)

## Install

```bash
netscript ui:add navigation-menu
```

## Usage and examples

The preview runs this JSX with the installed components. Import any composed primitives from your UI directory.

```tsx
import { useState } from 'preact/hooks';
import { NavigationMenu } from '@app/components/ui/navigation-menu.tsx';

export function Example() {
  const [value, setValue] = useState('standard');
  const [open, setOpen] = useState(false);
  const [notice, report] = useState('');
  return (<><div><NavigationMenu label="Order navigation" items={[{id:"orders",label:"Orders",href:"#orders"}]} /></div><p role="status">{notice}</p></>);
}
```

## Props

Generated from native `deno doc --json --private` over the shipped implementation. Compound component props retain their owning interface; native attributes pass through where declared.

| Owner | Prop | Type | Optional | Description |
| --- | --- | --- | --- | --- |
| `NavigationMenuProps` | `label` | `string` | No |  |
| `NavigationMenuProps` | `items` | `[object Object]` | No |  |
| `NavigationMenuProps` | `class` | `string` | Yes |  |

```typescript
NavigationMenuProps extends Omit<JSX.HTMLAttributes<HTMLElement>, "class">
```

## Keyboard

| Key | Action |
| --- | --- |
| `Enter/Space` | Toggle disclosure |
| `Escape` | Close disclosure and return focus to its summary. |
| `Tab/Shift+Tab` | Follow native link/summary order; focus exit closes disclosure. |

## Tokens

Semantic contract roles: `radius/control`, `text/fg`, `text/muted`.

CSS custom properties referenced directly: `--ns-border`, `--ns-border-width`, `--ns-card`, `--ns-control-gap`, `--ns-control-height-sm`, `--ns-control-padding-x`, `--ns-fg`, `--ns-hover`, `--ns-muted-fg`, `--ns-radius-card`, `--ns-radius-control`, `--ns-ring`, `--ns-shadow-md`, `--ns-space-1`, `--ns-space-16`, `--ns-space-2`, `--ns-text-body`, `--ns-text-small`, `--ns-text-strong`, `--ns-weight-strong`, `--ns-z-dropdown`.

## Contract and compatibility

Accessibility pattern: [WAI-ARIA guidance](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/)

- Native details/name exclusivity works before hydration; island adds Escape and focus-exit dismissal. Open/trigger/state are derived from the native disclosure and item records.
- Current links, including disclosure-panel links, own aria-current=page; their decorative marker has no tab stop. Escape is handled only while a disclosure is open, preserving outer native dismissal.

Design contract values marked planned are not implementation props. The props above describe what ships today.
