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/react

v0.0.7

Published

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

Downloads

80

Readme

@auto-skeleton/react

npm downloads license

Zero-config skeleton loaders for React. Wrap any component — auto-skeleton scans the live DOM at runtime and generates a pixel-accurate skeleton. No CLI, no build step, no config files to maintain.

Live demo → · Docs →


Installation

npm install @auto-skeleton/react

Quick start

import { AutoSkeleton } from "@auto-skeleton/react";
import "@auto-skeleton/react/styles.css";

function UserProfile({ userId }: { userId: string }) {
  const { data, isLoading } = useUser(userId);

  return (
    <AutoSkeleton id="user-profile" loading={isLoading}>
      <div className="profile">
        <img src={data?.avatar} alt="avatar" />
        <h2>{data?.name}</h2>
        <p>{data?.bio}</p>
      </div>
    </AutoSkeleton>
  );
}

How it works

  1. On first render where loading is false, the DOM is scanned with a TreeWalker
  2. Each element is measured with getBoundingClientRect and classified as rect, circle, or text
  3. Bones are cached in memory and sessionStorage keyed by id + viewport width
  4. When loading is true, a pixel-accurate overlay replaces the hidden content

Props

| Prop | Type | Required | Description | |---|---|:---:|---| | id | string | ✅ | Unique cache key | | loading | boolean | ✅ | Controls skeleton visibility | | className | string | | Added to root wrapper | | options | object | | See options below |

Options

| Option | Type | Default | Description | |---|---|---|---| | animation | "wave" \| "pulse" \| "none" | "wave" | Skeleton animation | | debug | boolean | false | Outline detected bones | | watch | boolean | true | Re-scan on layout changes | | watchDebounceMs | number | 120 | Debounce for re-scans | | cache | boolean | true | Enable sessionStorage cache | | minSize | number | 8 | Min element size (px) to create a bone | | ignoreSelectors | string[] | [] | CSS selectors to skip |


Data attributes

| Attribute | Effect | |---|---| | data-skeleton-ignore | Skip this element | | data-skeleton-shape="circle" | Force circular bone | | data-skeleton-shape="rect" | Force rectangular bone | | data-skeleton-lines="N" | Force N text-line bones | | data-skeleton-container | Scan children individually |


Theming

:root {
  --as-base: #e4e4e7;
  --as-highlight: rgba(255, 255, 255, 0.9);
}

.dark {
  --as-base: #27272a;
  --as-highlight: rgba(255, 255, 255, 0.05);
}

Next.js

// app/layout.tsx
import "@auto-skeleton/react/styles.css";
"use client";
import { AutoSkeleton } from "@auto-skeleton/react";

useAutoSkeleton hook

For custom rendering:

import { useAutoSkeleton } from "@auto-skeleton/react";

const { ref, bones, isScanning } = useAutoSkeleton({
  id: "my-component",
  loading,
  options: { animation: "pulse" },
});

Returns ref (attach to container), bones (array of detected bone objects), isScanning (true during scan).


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