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

@auto-skeleton/lit

v0.0.7

Published

Zero-config skeleton loaders for Lit and Web Components. Scans the live DOM at runtime — no manual shapes, no CLI, no config files.

Readme

@auto-skeleton/lit

Zero-config skeleton loaders for Lit and Web Components. It scans your live DOM at runtime to generate pixel-accurate skeleton bones automatically.

Installation

npm install @auto-skeleton/lit @auto-skeleton/core

Setup

Import the package once at your app's entry point to register the <auto-skeleton> custom element.

import '@auto-skeleton/lit';

Usage

Simple Example

Wrap any component or HTML fragment with <auto-skeleton>. Use the loading property to toggle between the skeleton and the actual content.

Note: The id property is required for layout caching.

import { html, LitElement } from 'lit';
import { customElement, state } from 'lit/decorators.js';
import '@auto-skeleton/lit';

@customElement('simple-card')
export class SimpleCard extends LitElement {
  @state() private isLoading = true;

  render() {
    return html`
      <auto-skeleton id="card-1" .loading=${this.isLoading}>
        <div class="card">
          <h2>Hello World</h2>
          <p>This content will be automatically scanned.</p>
        </div>
      </auto-skeleton>
    `;
  }
}

Advanced Configuration

Pass an options object to customize the animation, debugging, and scanning behavior.

render() {
  const skeletonOptions = {
    animation: 'pulse', // 'wave' | 'pulse' | 'none'
    debug: true,        // Show dashed outlines around detected bones
    cache: true,        // Enable/disable sessionStorage caching
    watch: true,        // Re-scan automatically on resize/DOM changes
    minSize: 10,        // Ignore elements smaller than 10px
    ignoreSelectors: ['.badge'] // CSS selectors to exclude
  };

  return html`
    <auto-skeleton id="adv-card" .loading=${this.isLoading} .options=${skeletonOptions}>
      <div class="card">
        <span class="badge">New</span>
        <h3>Advanced Card</h3>
      </div>
    </auto-skeleton>
  `;
}

Fine-tuning with Data Attributes

Use standard data attributes on your HTML elements to guide the scanner for complex layouts.

| Attribute | Effect | | :--- | :--- | | data-skeleton-ignore | Skip this element entirely. | | data-skeleton-shape="circle" | Force a circular bone (ideal for avatars). | | data-skeleton-lines="3" | Force a specific number of text lines for a paragraph. | | data-skeleton-container | Skip this element itself but scan its children. |

<div class="profile">
  <!-- Force a circle for the avatar -->
  <div class="avatar" data-skeleton-shape="circle">JD</div>
  
  <!-- Force 2 lines for the bio -->
  <p data-skeleton-lines="2">${this.bio}</p>
  
  <!-- Hide the "Follow" button from the skeleton -->
  <button data-skeleton-ignore>Follow</button>
</div>

Custom Theming

Override colors and animations using CSS variables.

auto-skeleton {
  --as-base: #e4e4e7;          /* Bone background */
  --as-highlight: #ffffff;      /* Wave animation shimmer */
}

/* Dark Mode Example */
@media (prefers-color-scheme: dark) {
  auto-skeleton {
    --as-base: #27272a;
    --as-highlight: rgba(255, 255, 255, 0.05);
  }
}

Complex Implementation

A full-featured example using nested components and multiple skeleton regions.

@customElement('social-feed')
export class SocialFeed extends LitElement {
  @state() private loading = true;

  render() {
    return html`
      <!-- Navigation Shell -->
      <auto-skeleton id="nav" .loading=${this.loading}>
        <nav>
          <div class="logo">App</div>
          <div class="user-profile" data-skeleton-shape="circle">JD</div>
        </nav>
      </auto-skeleton>

      <!-- Main Content Area -->
      <auto-skeleton id="feed" .loading=${this.loading}>
        <div class="feed-container" data-skeleton-container>
          ${[1, 2, 3].map(() => html`
            <div class="post">
              <div class="header">
                <div class="avatar" data-skeleton-shape="circle"></div>
                <div class="meta">
                  <div class="name">User Name</div>
                  <div class="date">2 hours ago</div>
                </div>
              </div>
              <div class="body" data-skeleton-lines="3">
                Post content goes here with multiple lines of text...
              </div>
            </div>
          `)}
        </div>
      </auto-skeleton>
    `;
  }
}

TypeScript Support

The package includes full TypeScript definitions:

import type { AutoSkeletonOptions } from '@auto-skeleton/lit';

Ecosystem

| Package | Description | |---|---| | @auto-skeleton/react | React component and hook | | @auto-skeleton/vue | Vue 3 component and composable | | @auto-skeleton/lit | Lit / Web Component | | @auto-skeleton/core | Framework-agnostic DOM scanner |

Contributors

License

MIT