Free
Pro

Sidenav

Ply sidenav is a free docs/section shell: a left rail and a scrollable body, with a hamburger on small screens. Copy sidenav in. It is not the Pro application shell, and it is not SidebarService (a leftover open/close boolean used by the marketing site rail).

When to use

  • Component docs, settings groups, and hubs that need a section list beside content.
  • When you want a free layout rail without dashboard chrome.

When not to use

  • Product chrome with page/dashboard modes, mini rail, and footer — use shell (Pro) and ShellService.
  • Toggling a one-off sidebar boolean — SidebarService is that leftover, not this layout.

Install with npx ply-ui-cli add sidenav.

freeshell Used by Base Elements, Blocks, and Layouts hubs — install with the CLI.

View source

Basic composition

Project nav items with routerLink / routerLinkActive="!text-blue-600" (the active class is how the shell picks the mobile label). Put page content or a <router-outlet> in the body.

Demo

Overview

Body content scrolls independently of the nav rail. Use the links on the left to switch panels.

When to use

  • Docs / catalog hubs with nested routes (Base Elements, Blocks, Layouts).
  • App section chrome (settings, admin) where the left rail switches views.
  • Prefer <ply-scroll-nav> for in-page section TOCs on a single long page.

Installation

Run the following command to add this shell to your project:

bash
npx ply-ui-cli add sidenav

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.

bash
npx -y ply-ui-mcp

Ply provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)
// Install: npx ply-ui-cli add sidenav
// Paths are relative to aliases.components (default: src/app/components)
import { SidenavBodyComponent } from './sidenav/sidenav-body/sidenav-body.component';
import { SidenavNavComponent } from './sidenav/sidenav-nav/sidenav-nav.component';
import { SidenavComponent } from './sidenav/sidenav.component';

@Component({
  selector: 'app-your-component',
  imports: [
    SidenavBodyComponent,
    SidenavComponent,
    SidenavNavComponent
  ],
  template: `...`
})
export class YourComponent {}

API for sidenav — generated from JSDoc in the library source.

API reference for sidenav
APIMemberTypeDefaultDescription
ply-sidenavclassstring''Extra host classes merged via `cn()`.
ply-sidenavcolorIconStrokedButtonColor | undefinedundefinedColor for the mobile nav toggle button.
ply-sidenavlayoutSidenavLayoutMode'auto'Layout chrome mode. `auto` follows the viewport `lg` breakpoint; `mobile` / `desktop` force that chrome (useful for narrow demos).
ply-sidenav-body—— — Main content slot for `ply-sidenav` (typically hosts a router outlet).
ply-sidenav-bodyclassstring''Extra host classes merged via `cn()`.
ply-sidenav-nav—— — Left navigation slot for `ply-sidenav`.
ply-sidenav-navclassstring''Extra host classes merged via `cn()`.