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

ng-pure-ui

v1.1.1

Published

A modular, vanilla JavaScript and CSS UI library.

Readme

Pure UI

A modular, vanilla JavaScript + CSS UI library with Angular-friendly integration helpers.

npm version npm downloads Live demo

Version

v1.1.0

Repository

  • npm: https://www.npmjs.com/package/ng-pure-ui
  • Live Demo: https://pureui.netlify.app/
  • Source: https://github.com/srivastavaanurag79/pure-ui
  • Issues: https://github.com/srivastavaanurag79/pure-ui/issues

Installation

npm install ng-pure-ui

Angular Compatibility

  • Angular 17+: standalone-first integration (recommended)
  • Angular 16 and below: NgModule + APP_INITIALIZER integration (supported)

Quick Start (Vanilla)

<link rel="stylesheet" href="node_modules/ng-pure-ui/pure-ui.css" />
<script src="node_modules/ng-pure-ui/pure-ui.js"></script>
<script>
  document.addEventListener("DOMContentLoaded", () => {
    Pure.init();
  });
</script>

Angular 17+ Integration

1) Add styles and script in angular.json

{
  "styles": [
    "src/styles.css",
    "node_modules/ng-pure-ui/variables.css",
    "node_modules/ng-pure-ui/pure-ui.css"
  ],
  "scripts": ["node_modules/ng-pure-ui/pure-ui.js"]
}

2) Use the Angular adapter helpers

Create src/app/pure-ui.service.ts:

import { Injectable, NgZone } from "@angular/core";
import Pure from "ng-pure-ui";
import {
  initWithNgZone,
  destroyWithNgZone,
  observeWithNgZone,
} from "ng-pure-ui/angular";

@Injectable({ providedIn: "root" })
export class PureUIService {
  constructor(private zone: NgZone) {}

  init(container?: HTMLElement, options?: Parameters<typeof Pure.init>[1]) {
    initWithNgZone(this.zone, container, options);
  }

  destroy(container?: HTMLElement) {
    destroyWithNgZone(this.zone, container);
  }

  observe(container?: HTMLElement, options?: Parameters<typeof Pure.observe>[1]) {
    return observeWithNgZone(this.zone, container, options);
  }

  get api() {
    return Pure;
  }
}

3) Initialize once (standalone bootstrap)

import { APP_INITIALIZER, ApplicationConfig, inject } from "@angular/core";
import { PureUIService } from "./pure-ui.service";

function initPureUI() {
  const pure = inject(PureUIService);
  return () => pure.init(undefined, { initTheme: true });
}

export const appConfig: ApplicationConfig = {
  providers: [{ provide: APP_INITIALIZER, useFactory: initPureUI, multi: true }],
};

4) Re-init dynamic content (optional)

ngAfterViewInit() {
  this.pure.observe(this.el.nativeElement, {
    initOptions: { initTheme: false }
  });
}

Angular 16 and Below Integration (NgModule)

1) Install

npm install ng-pure-ui

2) Add styles and script in angular.json

{
  "styles": [
    "src/styles.css",
    "node_modules/ng-pure-ui/variables.css",
    "node_modules/ng-pure-ui/pure-ui.css"
  ],
  "scripts": ["node_modules/ng-pure-ui/pure-ui.js"]
}

3) Use the same adapter service

Create src/app/pure-ui.service.ts:

import { Injectable, NgZone } from "@angular/core";
import Pure from "ng-pure-ui";
import {
  initWithNgZone,
  destroyWithNgZone,
  observeWithNgZone,
} from "ng-pure-ui/angular";

@Injectable({ providedIn: "root" })
export class PureUIService {
  constructor(private zone: NgZone) {}

  init(container?: HTMLElement, options?: Parameters<typeof Pure.init>[1]) {
    initWithNgZone(this.zone, container, options);
  }

  destroy(container?: HTMLElement) {
    destroyWithNgZone(this.zone, container);
  }

  observe(container?: HTMLElement, options?: Parameters<typeof Pure.observe>[1]) {
    return observeWithNgZone(this.zone, container, options);
  }
}

4) Initialize in AppModule with APP_INITIALIZER

import { APP_INITIALIZER, NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AppComponent } from "./app.component";
import { PureUIService } from "./pure-ui.service";

export function initPureUI(pure: PureUIService) {
  return () => pure.init(undefined, { initTheme: true });
}

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule],
  providers: [
    {
      provide: APP_INITIALIZER,
      useFactory: initPureUI,
      deps: [PureUIService],
      multi: true,
    },
  ],
  bootstrap: [AppComponent],
})
export class AppModule {}

New in v1.1

  • Lifecycle hardening:
    • Pure.init(container?, options?)
    • Pure.destroy(container?)
    • Pure.observe(container?, options?)
  • Command palette:
    • Pure.initCommandPalettes()
    • Pure.command.open(id?)
    • Pure.command.close(id?)
  • Angular adapter subpath:
    • ng-pure-ui/angular
  • Responsive updates across dropdowns, modals, calendar popups, tables, navbar/sidebar, tabs, tooltip/popover, alerts, and forms.
  • New components:
    • Command Palette (command-palette.css)
    • Empty State (empty-state.css)
    • Stats Tiles (stats.css)
  • Packaging improvements:
    • modern exports map
    • event-calendar.css included in build outputs
    • expanded pure-ui.d.ts

API Snapshot

Pure.init(container?, options?);
Pure.destroy(container?);
Pure.observe(container?, options?); // returns { disconnect() }

Pure.theme.update("light" | "dark");
Pure.theme.toggle();

Pure.command.open(id?);
Pure.command.close(id?);

Component Docs

All docs are in docs/:

Build, Test, Publish

npm run build
npm test
npm pack --dry-run

Package Exports

  • ng-pure-ui -> core API (pure-ui.js) + types (pure-ui.d.ts)
  • ng-pure-ui/angular -> Angular NgZone adapter helpers
  • ng-pure-ui/styles.css -> master stylesheet alias
  • ng-pure-ui/*.css -> component-level styles

License

ISC