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-st-lc-drawer

v19.0.0

Published

Angular Material sidenav drawer component for displaying application launcher with app list navigation.

Readme

NgxStLcDrawer

Angular Material sidenav drawer component for displaying application launcher with app list navigation.

Table of Contents


Overview

The ngx-st-lc-drawer component provides a Material Design sidenav drawer with an application launcher. Perfect for:

  • Multi-application portals
  • Application navigation menus
  • App switcher interfaces
  • Dashboard launchers

Installation

npm install ngx-st-lc-drawer

Import the module in your application:

import { NgxStLcDrawerModule } from 'ngx-st-lc-drawer';

@NgModule({
  imports: [
    NgxStLcDrawerModule
  ]
})
export class AppModule { }

Basic Usage

<ngx-st-drawer-lib [lcUserInit]="userApps">
  <!-- Your main content goes here -->
  <div class="main-content">
    <router-outlet></router-outlet>
  </div>
</ngx-st-drawer-lib>
export class AppComponent {
  userApps: LcUserInitModel = {
    appList: [
      {
        appName: 'Dashboard',
        appDescription: 'Main Dashboard',
        appUrl: '/dashboard',
        iconUrl: 'assets/icons/dashboard.svg',
        isLuncher: false
      },
      {
        appName: 'Analytics',
        appDescription: 'Analytics & Reports',
        appUrl: '/analytics',
        iconUrl: 'assets/icons/analytics.svg',
        isLuncher: false
      },
      {
        appName: 'Settings',
        appDescription: 'Application Settings',
        appUrl: '/settings',
        iconUrl: 'assets/icons/settings.svg',
        isLuncher: false
      }
    ]
  };
}

Inputs

lcUserInit

  • Type: LcUserInitModel
  • Description: Configuration object containing the list of applications to display in the drawer.
  • Example:
    [lcUserInit]="appConfig"

Models

LcUserInitModel

interface LcUserInitModel {
  appList: AppListItem[];
}

AppListItem

interface AppListItem {
  appName: string;          // Display name of the application
  appDescription: string;   // Description/subtitle for the application
  appUrl: string;           // Navigation URL or external link
  iconUrl: string;          // Path to application icon image
  isLuncher: boolean;       // Flag indicating if this is a launcher app
}

Methods

Access Drawer Programmatically

The component exposes the MatDrawer instance that can be accessed via @ViewChild:

@ViewChild(DrawerLibComponent) drawerComponent: DrawerLibComponent;

openDrawer() {
  this.drawerComponent.drawer.open();
}

closeDrawer() {
  this.drawerComponent.drawer.close();
}

toggleDrawer() {
  this.drawerComponent.drawer.toggle();
}

Examples

Basic Application Launcher

<ngx-st-drawer-lib [lcUserInit]="appLauncher">
  <div class="app-content">
    <mat-toolbar color="primary">
      <button mat-icon-button (click)="toggleMenu()">
        <mat-icon>menu</mat-icon>
      </button>
      <span>My Application</span>
    </mat-toolbar>
    
    <router-outlet></router-outlet>
  </div>
</ngx-st-drawer-lib>
export class AppComponent {
  @ViewChild(DrawerLibComponent) drawer: DrawerLibComponent;

  appLauncher: LcUserInitModel = {
    appList: [
      {
        appName: 'Home',
        appDescription: 'Return to home page',
        appUrl: '/',
        iconUrl: 'assets/icons/home.svg',
        isLuncher: false
      },
      {
        appName: 'Projects',
        appDescription: 'Manage your projects',
        appUrl: '/projects',
        iconUrl: 'assets/icons/projects.svg',
        isLuncher: false
      },
      {
        appName: 'Team',
        appDescription: 'Team management',
        appUrl: '/team',
        iconUrl: 'assets/icons/team.svg',
        isLuncher: false
      }
    ]
  };

  toggleMenu() {
    this.drawer.drawer.toggle();
  }
}

Multi-Application Portal

export class PortalComponent implements OnInit {
  @ViewChild(DrawerLibComponent) drawerComponent: DrawerLibComponent;
  
  portalApps: LcUserInitModel;

  constructor(
    private authService: AuthService,
    private appsService: AppsService
  ) {}

  ngOnInit() {
    // Load apps based on user permissions
    this.appsService.getUserApps(this.authService.getCurrentUser()).subscribe(apps => {
      this.portalApps = {
        appList: apps.map(app => ({
          appName: app.name,
          appDescription: app.description,
          appUrl: app.url,
          iconUrl: app.icon,
          isLuncher: app.type === 'launcher'
        }))
      };
    });
  }

  openAppMenu() {
    this.drawerComponent.drawer.open();
  }
}

Dynamic App List Based on Permissions

export class DynamicAppsComponent implements OnInit {
  appLauncher: LcUserInitModel = { appList: [] };

  constructor(
    private userService: UserService,
    private permissionService: PermissionService
  ) {}

  ngOnInit() {
    this.loadUserApps();
  }

  loadUserApps() {
    const allApps = [
      {
        appName: 'Admin Panel',
        appDescription: 'System administration',
        appUrl: '/admin',
        iconUrl: 'assets/icons/admin.svg',
        isLuncher: false,
        requiredPermission: 'admin'
      },
      {
        appName: 'User Management',
        appDescription: 'Manage users',
        appUrl: '/users',
        iconUrl: 'assets/icons/users.svg',
        isLuncher: false,
        requiredPermission: 'users.manage'
      },
      {
        appName: 'Analytics',
        appDescription: 'View analytics',
        appUrl: '/analytics',
        iconUrl: 'assets/icons/analytics.svg',
        isLuncher: false,
        requiredPermission: 'analytics.view'
      }
    ];

    // Filter apps based on user permissions
    const userApps = allApps.filter(app => 
      this.permissionService.hasPermission(app.requiredPermission)
    );

    this.appLauncher = {
      appList: userApps.map(app => ({
        appName: app.appName,
        appDescription: app.appDescription,
        appUrl: app.appUrl,
        iconUrl: app.iconUrl,
        isLuncher: app.isLuncher
      }))
    };
  }
}

Controlling Drawer State

export class DrawerControlComponent {
  @ViewChild(DrawerLibComponent) drawerComponent: DrawerLibComponent;
  
  appLauncher: LcUserInitModel = { /* ... */ };
  
  // Open drawer on component init
  ngAfterViewInit() {
    this.drawerComponent.drawer.open();
  }
  
  // Close drawer after navigation
  onNavigate() {
    this.drawerComponent.drawer.close();
  }
  
  // Toggle based on screen size
  @HostListener('window:resize', ['$event'])
  onResize(event: any) {
    if (event.target.innerWidth < 768) {
      this.drawerComponent.drawer.close();
    }
  }
}

Features

Material Design Integration

  • Built on Angular Material's MatSidenav
  • Follows Material Design guidelines
  • Responsive layout support

Application Navigation

  • Display list of applications with icons and descriptions
  • Internal routing support
  • External URL support
  • Launcher app identification

Drawer Control

  • Programmatic open/close/toggle
  • Event subscriptions
  • Responsive behavior

Customization

  • Custom styling support
  • Flexible content projection
  • Dynamic app list updates

Build

Run ng build ngx-st-lc-drawer to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build ngx-st-lc-drawer, go to the dist folder cd dist/ngx-st-lc-drawer and run npm publish.