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

@shaman-apprentice/page-skeleton

v1.0.1

Published

A custom element web component providing slots for header, sidebar and content.

Readme

page-skeleton

A custom element web component providing slots for header, sidebar and content. Works with any framework (Angular, React, Vue, etc.) or vanilla JavaScript.

example image

Installation

npm install @shaman-apprentice/page-skeleton

Note: Make sure your CSS reset sets body { margin: 0; } for the component to display correctly. Most modern CSS resets include this anyway.

Usage

With Angular

import { Component, signal, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@shaman-apprentice/page-skeleton';

@Component({
  selector: 'app-root',
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
  template: `
    <page-skeleton 
      [attr.sidebar-open]="isSidebarOpen() ? '' : null"
      [attr.sidebar-width-in-px]="sidebarWidth()"
      (sidebar-width-changed)="onSidebarWidthChanged($event)"
      animated
    >
      <header slot="header">
        <button (click)="isSidebarOpen.set(!isSidebarOpen())">Toggle</button>
        My App
      </header>
      
      <aside slot="sidebar">Sidebar content</aside>
      
      <section slot="sidebar-border"></section>
      
      <main slot="content">Main content</main>
    </page-skeleton>
  `
})
export class AppComponent {
  isSidebarOpen = signal(true);
  sidebarWidth = signal(320);
  
  onSidebarWidthChanged(event: CustomEvent<{ width: number }>) {
    this.sidebarWidth.set(event.detail.width);
  }
}

API

Slots

| Slot Name | Description | | --- | --- | | header | Fixed header at the top | | sidebar | Collapsible sidebar on the left | | sidebar-border | Draggable border between sidebar and content | | content | Main content area |

Attributes

| Attribute | Type | Default | Description | | --- | --- | --- | --- | | sidebar-width-in-px | number | 320 | Current sidebar width in pixels | | sidebar-min-width-in-px | number | 240 | Minimum sidebar width in pixels | | sidebar-open | boolean | false | Whether sidebar is open | | disable-dragging | boolean | false | Disable sidebar resize dragging | | animated | boolean | false | Enable slide animation for sidebar |

Properties (JavaScript)

Access via JavaScript:

const skeleton = document.querySelector('page-skeleton');
skeleton.sidebarWidthInPx = 400;
skeleton.sidebarOpen = true;

Events

| Event | Detail | Description | | --- | --- | --- | | sidebar-width-changed | { width: number } | Fired when sidebar is resized by dragging |

CSS Variables

| Variable | Default | Description | | --- | --- | --- | | --page-skeleton_header-height | 48px | Header height | | --page-skeleton_sidebar_border-width | 1px | Border width | | --page-skeleton_transition-duration | 0.3s | Animation duration | | --page-skeleton_transition-timing-function | ease-in-out | Animation easing |

CSS Parts

You can style each internal layout containers using the ::part() selector:

| Part Name | Description | | --- | --- | | header | Header container | | sidebar | Sidebar container | | content | Content container | | sidebar_border | Sidebar border/resize handle |

Example:

page-skeleton::part(header) {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

Migration from @shaman-apprentice/ngx-page-skeleton

If you're upgrading from @shaman-apprentice/ngx-page-skeleton, see this migration guide.