# Sidebar

App navigation in groups, marking the current page.

- **Use it for**: Persistent app navigation with groups and the current page.
- **Not for**: Detail about a selected item. Try [Sidecar](https://unseenui.com/components/sidecar/).

## Installation

```bash
npm install @stackunseen/ui
```

## Usage

```tsx
import { Sidebar } from '@stackunseen/ui';
import '@stackunseen/ui/styles.css';

<Sidebar label="Component navigation"><Sidebar.Group label="Library"><Sidebar.Link href="/?component=Button">Foundations</Sidebar.Link><Sidebar.Link href="/?component=Sidebar" current>Navigation</Sidebar.Link></Sidebar.Group></Sidebar>
```

## All props

| Prop | Type | Description |
| --- | --- | --- |
| `as` | `"div" \| "nav"` | Use div inside an existing navigation landmark, such as WorkspaceShell.navigation. |
| `label` | `string` |  |

## Keyboard

Tab visits available links in document order. Current links use aria-current; disabled destinations are removed from the tab sequence.

## Works with

[DropdownMenu](https://unseenui.com/components/dropdown-menu/), [ContextMenu](https://unseenui.com/components/context-menu/), [NavigationMenu](https://unseenui.com/components/navigation-menu/), [Breadcrumb](https://unseenui.com/components/breadcrumb/), [Pagination](https://unseenui.com/components/pagination/), [Stepper](https://unseenui.com/components/stepper/), [CommandPalette](https://unseenui.com/components/command-palette/), [TableOfContents](https://unseenui.com/components/table-of-contents/), [ShareMenu](https://unseenui.com/components/share-menu/), [Tabs](https://unseenui.com/components/tabs/)

Page: https://unseenui.com/components/sidebar/
