<base-responsive-nav> is a progressive (priority+) navigation bar. Project <base-responsive-nav-item> children with labels and optional icons. As many items as fit stay visible; the rest spill into a More dropdown from the right as the container shrinks. Leftmost items have the highest priority and remain visible longest.
Drag the right edge of the preview (or shrink the browser window). Links peel off from the right into the chevron menu.
Hint: grab the southeast corner of the dashed box and drag horizontally.
Put any content inside an item — text, icons, or both. Prefer routerLink for in-app routes. Use href (and optional target) for external URLs. When both are set, routerLink wins. Use menuLabel when the overflow menu should show different text than the bar.
<base-shell> sidebar under ~991px when you hide the bar entirely on small screens. Run the following command to add this component to your project:
npx base-ui-cli add responsive-nav
Base UI provides standalone components. Import the exact elements you want to use into your component.
import { ResponsiveNavComponent, ResponsiveNavItemComponent } from '@lussos/base-ui';
@Component({
selector: 'app-your-component',
imports: [
ResponsiveNavComponent,
ResponsiveNavItemComponent
],
template: `...`
})
export class YourComponent {} Properties for responsive-nav — generated from JSDoc in the library source.
| Selector | Property | Type | Default | Description |
|---|---|---|---|---|
base-responsive-nav | class | string | '' | Extra host classes merged via `cn()`. |
base-responsive-nav | linkClass | unknown | RESPONSIVE_NAV_DEFAULT_LINK_CLASS | Tailwind classes applied to each item link. |
base-responsive-nav | moreLabel | unknown | 'More navigation links' | Accessible label for the overflow "More" trigger button. |
base-responsive-nav-item | class | string | '' | Extra classes merged onto the inner link/span. |
base-responsive-nav-item | routerLink | string | readonly any[] | undefined | undefined | In-app route (`RouterLink`). Wins over `href` when both are set. |
base-responsive-nav-item | href | string | undefined | undefined | Absolute or external URL when not using `routerLink`. |
base-responsive-nav-item | target | string | undefined | undefined | Optional `target` for `href` links (e.g. `_blank`). |
base-responsive-nav-item | menuLabel | string | undefined | undefined | Label used in the overflow "More" menu. Defaults to the projected text. |
Customize your UI instantly.
Copy these styles to paste into your project's global CSS and Tailwind config.