npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ngx-smart/ngx-smart-sidebar

v1.0.2

Published

A customizable, collapsible, responsive, feature-rich sidebar component for Angular apps.

Downloads

26

Readme

🌟 ngx-smart-sidebar

A customizable, collapsible, responsive, feature-rich sidebar component for Angular apps.

NPM Version

✨ Features

  • 🌈 Fully customizable styling with background/hover colors
  • 📏 Multiple size options (small, medium, large)
  • 🔀 Flexible positioning (left or right)
  • 📊 Multi-level nested navigation support
  • 📱 Responsive design with collapsible functionality
  • 🔄 Angular Router integration
  • 👆 Click-outside closing capability
  • 💾 State persistence between sessions

🚀 Installation

npm i @ngx-smart/ngx-smart-sidebar --save

⚙️ Basic Implementation

  1. Import the SidebarComponent in your Angular Component / Module:
  2. Define your sidebar items
  3. Use the sidebar component in your template
import { Component } from "@angular/core";
import { SidebarComponent, SidebarSection } from "@ngx-smart/ngx-smart-sidebar";

@Component({
  selector: "app-root",
  standalone: true,
  imports: [SidebarComponent],
  template: `
    <lib-sidebar [items]="sidebarItems" [title]="'Navigation'" [activeItemPath]="'/dashboard'" [sidebarId]="'main-sidebar'"> </lib-sidebar>

    <div class="content">
      <!-- Your page content here -->
    </div>
  `,
})
export class AppComponent {
  sidebarItems: SidebarSection[] = [
    {
      header: "Main",
      labels: [
        { label: "Dashboard", path: "/dashboard" },
        { label: "Analytics", path: "/analytics" },
        {
          label: "User Management",
          children: [
            { label: "User List", path: "/users" },
            { label: "Add User", path: "/users/add" },
          ],
        },
      ],
    },
    {
      header: "Settings",
      labels: [
        { label: "Profile", path: "/profile" },
        { label: "Preferences", path: "/settings" },
      ],
    },
  ];
}

🎨 Custom Styling & Content

<lib-sidebar [position]="'left'" [width]="'medium'" [title]="'My App'" [items]="sidebarItems" [activeItemPath]="activePath" [sidebarId]="'main-sidebar'" [collapsible]="true" [sidebarBackgroundColor]="'#f5f5f5'" [backgroundHighlightColor]="'#e0f7fa'">
  <!-- Custom header content -->
  <div sidebarHeaderContent>
    <img src="assets/logo.png" alt="Logo" width="120" />
  </div>

  <!-- Custom footer content -->
  <div sidebarFooterContent>
    <p>© 2025 My App</p>
  </div>
</lib-sidebar>

🛠️ Configuration Options

Input Properties

| Input | Type | Default | Description | | -------------------------- | ---------------- | ----------- | ---------------------------------------------------------------------------------------------- | | position | SidebarPosition | 'left' | Position of the sidebar. Options are 'left' or 'right'. | | width | SidebarWidth | 'medium' | Width of the sidebar. Options are 'small' (150px), 'medium' (250px), or 'large' (300px). | | title | string | '' | Title displayed at the top of the sidebar. | | backgroundHighlightColor | string | '#f5f7fa' | Background color for highlighting when hovering over items. | | items | SidebarSection[] | [] | Array of sidebar section objects defining the navigation structure. | | activeItemPath | string | '' | Path of the currently active item, should match the router path. | | sidebarId | string | '' | Unique identifier for the sidebar, useful when using multiple sidebars. | | collapsible | boolean | true | Whether the sidebar can be collapsed. | | hideSidebarOnPathChange | boolean | false | Whether to automatically collapse the sidebar when the route changes. | | closeOnClickOutside | boolean | false | Whether to close the sidebar when clicking outside of it. | | sidebarBackgroundColor | string | '#ffffff' | Background color of the sidebar. |

Types

export type SidebarPosition = "left" | "right";
export type SidebarWidth = "small" | "medium" | "large";

export interface SidebarLabel {
  label: string;
  path?: string;
  children?: SidebarLabel[];
  isExpanded?: boolean;
}

export interface SidebarSection {
  header: string;
  labels: SidebarLabel[];
}

📸 Visual Examples

Default Sidebar

Sidebar Image

Custom Hover Background

Sidebar Custom Hover Backaground Image

Custom Sidebar Background

Sidebar Custom Sidebar Background

Custom Header and Footer Content Projection

The sidebar provides two content projection slots:

  • sidebarHeaderContent: Custom content for sidebar header area
  • sidebarFooterContent: Custom content for sidebar footer area

You can add custom content to the header and footer of the sidebar:

<lib-sidebar [items]="sidebarItems">
  <div sidebarHeaderContent>
    <img src="assets/logo.png" alt="Logo" width="120" />
  </div>

  <div sidebarFooterContent>
    <p>© 2025 My App</p>
  </div>
</lib-sidebar>

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.