# Navbar (Andromeda Pro)

Navbar is a component of the Premium Andromeda Pro design system from AI Canvas (https://aicanvas.me). Index of every system, component and install setup: https://aicanvas.me/llms.txt

Keeps the brand, page links and main action at the top of a page, and marks the section you are reading.

- Design system: [Andromeda Pro](https://aicanvas.me/design-systems/andromeda-pro.md)
- License: Premium (proprietary)
- Install slug: `andromeda-pro-navbar`
- Page: https://aicanvas.me/design-systems/andromeda-pro/navbar

## Install

```bash
npx shadcn@latest add @aicanvas/andromeda-pro-navbar
```

Requires Premium. Without a Premium token the command writes a placeholder (a `PremiumLocked` notice) instead of the component.

Every Andromeda Pro component at once: `npx shadcn@latest add @aicanvas/andromeda-pro`.

Token setup: the Install section of https://aicanvas.me/llms.txt.

## Use it

It installs to `components/aicanvas/andromeda-pro/components/Navbar.tsx` (under `src/` if your project has one). With the usual `@/` alias:

```tsx
import { Navbar } from '@/components/aicanvas/andromeda-pro/components/Navbar'
```

## Example

```tsx
import { Navbar } from '@/components/aicanvas/andromeda-pro/components/Navbar'

<Navbar
  brand="Workspace"
  links={[{ label: 'Features', href: '#features' }, { label: 'Pricing', href: '#pricing' }]}
  sticky
/>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `brand` | `React.ReactNode` |  | The brand lockup on the left (a mark and the product name). Shown again at the head of the menu drawer. |
| `links?` | `{ label: string, href: string }[]` |  | The page's links, centred. An href starting with '#' scrolls to that section smoothly and is tracked; any other href navigates. |
| `actions?` | `React.ReactNode` |  | The primary action on the right, kept in the bar at every width. One filled Button. |
| `secondaryActions?` | `React.ReactNode` |  | Quiet actions before the primary one (a ghost Sign in). Fold into the menu below md. |
| `menuActions?` | `React.ReactNode` |  | The drawer footer, primary first. Defaults to `actions` then `secondaryActions` as given. |
| `trackSections?` | `boolean` | `true` | Mark the link for the section in view with aria-current="location". |
| `sectionSelector?` | `string` | `'section'` | The elements the reading line is tested against. A match without a linked id clears the mark. |
| `sticky?` | `boolean` | `true` | Stick to the top of the scroller, with the hairline shown once the page has moved. False renders a static bar with its hairline always on. |
| `maxWidth?` | `string` |  | The row's max width (a CSS length), to line the bar up with the page's content column. Full width by default. |
| `menuLabel?` | `string` | `'Menu'` | The drawer's accessible name; the menu buttons read "Open menu" and "Close menu" from it. |
| `onNavigate?` | `(href: string) => void` |  | Called instead of the browser's own navigation for links not starting with '#', for a client router. |

## Remix prompt

Only when the user wants Navbar rebuilt from scratch instead of installed: the public part of its remix prompt is in the Remix panel at https://aicanvas.me/design-systems/andromeda-pro/navbar.

## More Andromeda Pro components

- [Nav Item](https://aicanvas.me/design-systems/andromeda-pro/nav-item.md)
- [Panel Header](https://aicanvas.me/design-systems/andromeda-pro/panel-header.md)
- [Panel Menu](https://aicanvas.me/design-systems/andromeda-pro/panel-menu.md)
- [Payment Card](https://aicanvas.me/design-systems/andromeda-pro/payment-card.md)
- [Planet](https://aicanvas.me/design-systems/andromeda-pro/planet.md)
