Nav Bar is a vertical sidebar navigation component with expandable and collapsible states, available in Default, Gray, and Brand styles.
Loading demo: nav-bar-real-world
npx sdaia-ui@latest add nav-bar
import { NavBar } from '@/components/ui/NavBar';<NavBar state="expanded" style="default" />Standard navigation bar with the default style. Toggle expanded or collapsed to preview both states.
Loading demo: nav-bar-default
Navigation bar in the grey style.
Loading demo: nav-bar-gray
Navigation bar with the brand colour applied.
Loading demo: nav-bar-brand
Compact navigation bar layout optimised for mobile screens.
Loading demo: nav-bar-mobile
Props for the NavBar component.
Prop | Type | Default | Required |
|---|---|---|---|
variant | 'default' | 'gray' | 'brand' | 'default' | optional |
collapsed | boolean | false | optional |
mobile | boolean | false | optional |
onToggle | () => void | - | optional |
headerProps | Omit<HeaderItemProps, 'variant' | 'size'> | - | optional |
footerProps | Omit<FooterItemProps, 'variant' | 'size'> | - | optional |
groups | NavBarGroup[] | [] | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Full navigation bar. |
| Tablet (768–1279px) | A sidebar from 768px, shown as a 64px icon-only bar until 1280px so labels never squeeze the page. Below 768px it switches automatically to a menu button that opens a side drawer. |
| Phone (under 768px) | Menu button with a side drawer (320px wide). |