<ply-responsive-nav> is a progressive (priority+) navigation bar. Project <ply-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.
<ply-responsive-nav> <ply-responsive-nav-item routerLink="/base-elements">Components</ply-responsive-nav-item> <ply-responsive-nav-item routerLink="/blocks">Blocks</ply-responsive-nav-item> <ply-responsive-nav-item routerLink="/layouts">Layouts</ply-responsive-nav-item> <ply-responsive-nav-item routerLink="/templates">Templates</ply-responsive-nav-item> <ply-responsive-nav-item routerLink="/learn">Blog</ply-responsive-nav-item> <ply-responsive-nav-item routerLink="/pricing">Pricing</ply-responsive-nav-item> </ply-responsive-nav>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add responsive-nav
// Paths are relative to aliases.components (default: src/app/components)
import { ResponsiveNavItemComponent } from './responsive-nav/responsive-nav-item.component';
import { ResponsiveNavConfig } from './responsive-nav/responsive-nav-tokens';
import { ResponsiveNavComponent } from './responsive-nav/responsive-nav.component';
@Component({
selector: 'app-responsive-nav-example',
imports: [
ResponsiveNavComponent,
ResponsiveNavItemComponent
],
template: `...`
})
export class ResponsiveNavExampleComponent {}Install
npx ply-ui-cli add responsive-nav
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.
<ply-responsive-nav>
<ply-responsive-nav-item routerLink="/base-elements/responsive-nav">
<ply-icon name="book" class="h-4 w-4 stroke-slate-500 dark:stroke-slate-400"></ply-icon>
Overview
</ply-responsive-nav-item>
<ply-responsive-nav-item href="#sect4">API</ply-responsive-nav-item>
<ply-responsive-nav-item href="https://github.com/ply-ui-ng/ply" target="_blank">
Docs
</ply-responsive-nav-item>
</ply-responsive-nav>TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add responsive-nav
// Paths are relative to aliases.components (default: src/app/components)
import { ResponsiveNavItemComponent } from './responsive-nav/responsive-nav-item.component';
import { ResponsiveNavConfig } from './responsive-nav/responsive-nav-tokens';
import { ResponsiveNavComponent } from './responsive-nav/responsive-nav.component';
@Component({
selector: 'app-responsive-nav-example',
imports: [
ResponsiveNavComponent,
ResponsiveNavItemComponent
],
template: `...`
})
export class ResponsiveNavExampleComponent {}Install
npx ply-ui-cli add responsive-nav
<ply-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 ply-ui-cli add responsive-nav
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.
npx -y ply-ui-mcp
Ply provides standalone components. Import the exact elements you want to use into your component.
// Install: npx ply-ui-cli add responsive-nav
// Paths are relative to aliases.components (default: src/app/components)
import { ResponsiveNavItemComponent } from './responsive-nav/responsive-nav-item.component';
import { ResponsiveNavConfig } from './responsive-nav/responsive-nav-tokens';
import { ResponsiveNavComponent } from './responsive-nav/responsive-nav.component';
@Component({
selector: 'app-your-component',
imports: [
ResponsiveNavComponent,
ResponsiveNavItemComponent
],
template: `...`
})
export class YourComponent {} API for responsive-nav — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
ResponsiveNavConfig | linkClass | Signal<string> | — | — |
ply-responsive-nav | class | string | '' | Extra host classes merged via `cn()`. |
ply-responsive-nav | linkClass | unknown | RESPONSIVE_NAV_DEFAULT_LINK_CLASS | Tailwind classes applied to each item link. |
ply-responsive-nav | moreLabel | unknown | 'More navigation links' | Accessible label for the overflow "More" trigger button. |
ply-responsive-nav-item | class | string | '' | Extra classes merged onto the inner link/span. |
ply-responsive-nav-item | routerLink | string | readonly (string | number)[] | undefined | undefined | In-app route (`RouterLink`). Wins over `href` when both are set. |
ply-responsive-nav-item | href | string | undefined | undefined | Absolute or external URL when not using `routerLink`. |
ply-responsive-nav-item | target | string | undefined | undefined | Optional `target` for `href` links (e.g. `_blank`). |
ply-responsive-nav-item | menuLabel | string | undefined | undefined | Label used in the overflow "More" menu. Defaults to the projected text. |