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

@fidurcode/dashboard-widgets-skeleton

v2.0.4

Published

Reusable Angular components and services for building dynamic dashboard widgets with configurable layout, sizing, colors, and interactive controls.

Readme

@fidurcode/dashboard-widgets-skeleton

Reusable Angular components and services for building dynamic dashboard widgets with configurable layout, sizing, colors, and interactive controls.


📦 Installation

npm install @fidurcode/dashboard-widgets-skeleton

🚀 Usage

Import the module:

import { DashboardWidgetsSkeletonModule } from '@fidurcode/dashboard-widgets-skeleton';

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

Use in template:

<fidurcode-dashboard-widgets
  [title]="'My Dashboard'"
  [widgets]="widgets"
  [rowHeight]="80"
  [widgetPadding]="12"
  (widgetChange)="onWidgetChange($event)">
</fidurcode-dashboard-widgets>

🧩 Components Overview


DashboardWidgetsComponent

Selector: fidurcode-dashboard-widgets

Main container component. Manages layout, persistence (localStorage), and edit mode.

Inputs

| Name | Type | Default | Description | |----------------|--------------------|----------------------|--------------------------------------------------| | title | string | (required) | Dashboard header title | | widgets | Widget[] | (required) | Available widget definitions | | storageKey | string | 'dashboard-widgets'| localStorage key for persisting layout | | columns | number or 'auto' | 'auto' | Grid column count or 'auto' for responsive fit | | minTileWidth | number | 200 | Minimum tile width in px (used in auto mode) | | rowHeight | number | 80 | Row height in px | | gap | number | 12 | Gap between widgets in px | | maxColumns | number | 4 | Maximum columns available in widget options | | maxRows | number | 4 | Maximum rows available in widget options | | widgetPadding| number | 12 | Padding inside widget content area in px | | editMode | boolean | true | Initial edit mode state |

Outputs

| Name | Type | Description | |----------------|------------|--------------------------------------------------| | widgetChange | Widget[] | Emits the current widget list on every change |


WidgetComponent

Selector: app-widget

Individual widget wrapper. Renders dynamic content and provides a header with action buttons.

Inputs

| Name | Type | Required | Description | |--------|----------|----------|--------------------------------| | data | Widget | ✅ Yes | Widget configuration object |

Features

  • Collapse/expand — toggles widget to header-only view; state is persisted
  • Fullscreen — expands widget to cover the full viewport; press Escape to exit
  • Inline rename — double-click the title to rename (edit mode only)
  • Edit mode guard — settings button hidden when dashboard is locked

WidgetOptionsComponent

Selector: app-widget-options

Settings overlay rendered inside the widget. Visible only in edit mode on unpinned widgets.

Features

  • Rename — overrides the widget label with a custom name
  • Resize — toggle group for columns (width) and rows (height)
  • Color palette — 7 accent colors + default; applied as widget background
  • Pin/unpin — pinned widgets cannot be moved or deleted
  • Delete — removes widget from dashboard
  • Move left/right — reorders widget in the grid

🏗️ Widget Interface

interface Widget {
  id: number;
  label: string;              // translation key
  content: Type<unknown>;     // Angular component to render as content
  rows?: number;
  columns?: number;
  defaultRows?: number;       // initial rows when widget is first added
  defaultColumns?: number;    // initial columns when widget is first added
  color?: string;             // CSS color string (e.g. '#3b82f6')
  pinned?: boolean;
  collapsed?: boolean;
  customLabel?: string;       // user-defined label override (not a translation key)
}

🌍 Required Translation Keys

Add the following keys to your ngx-translate translation files:

{
  "DASHBOARD": {
    "ADD_WIDGET": "Add widget",
    "NO_WIDGETS": "No widgets available",
    "LOCK": "Lock dashboard",
    "UNLOCK": "Unlock dashboard"
  },
  "WIDGET": {
    "WIDTH": "Width",
    "HEIGHT": "Height",
    "RENAME": "Name",
    "COLOR": "Color",
    "COLOR_DEFAULT": "Default",
    "DELETE": "Delete",
    "PIN": "Pin",
    "UNPIN": "Unpin",
    "MOVE_LEFT": "Move left",
    "MOVE_RIGHT": "Move right",
    "CLOSE_OPTIONS": "Close",
    "COLLAPSE": "Collapse",
    "EXPAND": "Expand",
    "FULLSCREEN": "Fullscreen",
    "EXIT_FULLSCREEN": "Exit fullscreen",
    "SETTINGS": "Settings"
  }
}

Widget label fields are also treated as translation keys and resolved at runtime.


💾 Layout Persistence

The dashboard automatically saves and restores widget state via localStorage using the storageKey input. Persisted state includes: position order, rows, columns, color, custom label, collapsed state, and pinned state.

The format is backward compatible — dashboards saved with v1.4.x (IDs only) are migrated automatically on first load.