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

@m2s2/ng-lib

v2.0.0

Published

Angular component library by M²S² Engineering Group — production-ready UI components built with signals and standalone architecture.

Readme

@m2s2/ng-lib

Angular component library by M²S² Engineering Group. Production-ready UI components built with signals and standalone architecture.

For live component demos and prop documentation, see Storybook.

Installation

npm install @m2s2/ng-lib @m2s2/models @m2s2/tokens

Peer Dependencies

| Package | Version | |---------|---------| | @angular/animations | >=21.0.0 | | @angular/cdk | >=21.0.0 | | @angular/common | >=21.0.0 | | @angular/core | >=21.0.0 | | @angular/forms | >=21.0.0 | | @angular/material | >=21.0.0 | | @angular/router | >=21.0.0 | | @m2s2/models | >=0.1.0 | | @m2s2/tokens | >=1.0.0 |

Setup

Import the global stylesheet in your styles.scss:

@use '@m2s2/tokens';
@use '@m2s2/ng-lib/styles';

Usage

All components are standalone — import only what you need:

import { NavbarComponent, FooterComponent } from '@m2s2/ng-lib';
import type { NgNavbarConfig, FooterConfig } from '@m2s2/ng-lib';

@Component({
  standalone: true,
  imports: [NavbarComponent, FooterComponent],
  template: `
    <m2-navbar [navbarConfig]="navbar" />
    <main>...</main>
    <m2s2-footer [config]="footer" />
  `,
})
export class AppComponent {
  navbar: NgNavbarConfig = { brand: 'My App', brandRouterOutlet: '/', isFixed: true, buttons: [] };
  footer: FooterConfig = { brandName: 'My App', links: [] };
}

Authentication

@m2s2/ng-lib does not ship with a concrete auth implementation. Instead it exposes an M2S2AuthProvider interface and an M2S2_AUTH_PROVIDER injection token. Components like NavbarComponent use this token to show or hide auth-gated items — no auth library is required if you don't need that feature.

1. Implement the interface

import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
import { M2S2AuthProvider, M2S2AuthUser } from '@m2s2/ng-lib';
// import whatever auth library you use, e.g. aws-amplify, auth0-angular, angularfire

@Injectable({ providedIn: 'root' })
export class MyAuthProvider implements M2S2AuthProvider {
  loggedIn$ = new BehaviorSubject<boolean>(false);

  async getCurrentUser(): Promise<M2S2AuthUser | undefined> {
    // return { userId: '...', username: '...' } or undefined
  }

  signOut(): void {
    // call your auth library's sign-out
  }
}

2. Provide it in app.config.ts

import { M2S2_AUTH_PROVIDER } from '@m2s2/ng-lib';
import { MyAuthProvider } from './auth/my-auth.provider';

export const appConfig: ApplicationConfig = {
  providers: [
    // ...
    { provide: M2S2_AUTH_PROVIDER, useClass: MyAuthProvider },
  ],
};

If M2S2_AUTH_PROVIDER is not provided, auth-gated navbar items are simply hidden and no errors are thrown.

Components

| Component | Selector | |-----------|----------| | NavbarComponent | m2-navbar | | FooterComponent | m2s2-footer | | BaseCardComponent | m2s2-card | | BlogCardComponent | m2s2-blog-card | | FeatureCardComponent | m2s2-feature-card | | PageHeaderComponent | m2s2-page-header | | SectionHeaderComponent | m2s2-section-header | | StatRowComponent | m2s2-stat-row | | ProcessStepsComponent | m2s2-process-steps | | CtaSectionComponent | m2s2-cta-section | | StatusBadgeComponent | m2s2-status-badge | | DataTableComponent | m2s2-data-table | | DropdownItemComponent | m2s2-dropdown-item | | DialogComponent | m2s2-dialog | | PanelComponent | m2s2-panel | | SubscribeFormComponent | m2s2-subscribe-form |

Services

| Service | Description | |---------|-------------| | M2S2DialogService | Open and manage dialogs imperatively | | M2S2PanelService | Open and manage panels/drawers imperatively |

Auth API

| Export | Description | |--------|-------------| | M2S2AuthProvider | Interface your auth provider must implement | | M2S2AuthUser | Shape of the authenticated user object (userId, username) | | M2S2_AUTH_PROVIDER | InjectionToken<M2S2AuthProvider> — provide your implementation here |