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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@dragonworks/ngx-dashboard

v20.3.2

Published

Angular library for building drag-and-drop grid dashboards with resizable cells and customizable widgets

Readme

@dragonworks/ngx-dashboard

Core Angular library for building drag-and-drop grid dashboards with resizable cells and customizable widgets.

Installation

npm install @dragonworks/ngx-dashboard

Features

  • Grid-based Drag & Drop: Collision detection and boundary constraints
  • Resizable Cells: Dynamic resizing with minimum size constraints
  • Dual-Mode Display: Editor mode for configuration, viewer mode for presentation
  • NgRx Signals State Management: Reactive state with normalized widget storage
  • Material Design 3 Integration: Full MD3 compliance with theme tokens
  • Context Menu System: Right-click operations with Material menu
  • Extensible Widget System: Factory pattern for custom widget types
  • Performance Optimized: 100% OnPush change detection strategy
  • Provider Pattern: Extensible dialog and settings providers

Requirements

  • Angular 20.2.0+
  • Angular Material 20.2.0+
  • Angular CDK 20.2.0+

Basic Usage

import { Component } from "@angular/core";
import { DashboardComponent, createEmptyDashboard } from "@dragonworks/ngx-dashboard";
import type { DashboardData } from "@dragonworks/ngx-dashboard";

@Component({
  selector: "app-dashboard-page",
  standalone: true,
  imports: [DashboardComponent],
  template: ` <ngx-dashboard [dashboardData]="dashboard" [editMode]="true" (dashboardChange)="onDashboardChange($event)"> </ngx-dashboard> `,
})
export class DashboardPageComponent {
  dashboard = createEmptyDashboard("my-dashboard", 12, 8);

  onDashboardChange(data: DashboardData) {
    // Handle dashboard updates
    console.log("Dashboard changed:", data);
  }
}

Widget Registration

Register custom widgets with the DashboardService:

import { Injectable } from "@angular/core";
import { DashboardService } from "@dragonworks/ngx-dashboard";
import { MyCustomWidget } from "./widgets/my-custom-widget.component";

@Injectable({ providedIn: "root" })
export class WidgetSetupService {
  constructor(private dashboardService: DashboardService) {
    this.registerWidgets();
  }

  private registerWidgets() {
    this.dashboardService.registerWidgetType(MyCustomWidget.metadata);
  }
}

Components

Main Components

  • DashboardComponent - Main dashboard component with automatic mode switching
  • DashboardEditorComponent - Editor mode with drag & drop
  • DashboardViewerComponent - Viewer mode for presentation
  • WidgetListComponent - Widget palette for drag & drop

Services

  • DashboardService - Widget registration and management

Models & Utilities

  • createEmptyDashboard() - Create new dashboard configuration
  • DashboardData - Dashboard configuration interface
  • CellData - Individual cell/widget data
  • WidgetMetadata - Widget type definition

Widget State Management

Widgets can implement optional lifecycle methods:

export interface DashboardWidgetComponent {
  dashboardGetState?(): unknown;
  dashboardSetState?(state: unknown): void;
  dashboardEditState?(): void;
}

Documentation

See the main repository for full documentation, examples, and demo application.

License

MIT