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

skeleton-auto-react

v1.0.0

Published

Automatic skeleton loading placeholders that mirror your component's real dimensions — no manual skeleton markup needed.

Readme

skeleton-auto

Automatic skeleton loading placeholders for React — no manual skeleton markup needed.

Wrap your real component with <Skeleton>. While loading, it measures your component's actual rendered size and shows a shimmer placeholder in that exact shape. When loading finishes, your real content just appears in place.

<Skeleton loading={isLoading}>
  <UserCard user={data} />
</Skeleton>

No need to hand-write skeleton markup that has to be kept in sync with your real component's layout.

Install

npm install skeleton-auto-react

React 16.8+ is required (peer dependency, not bundled).

Quick start

import { Skeleton } from "skeleton-auto-react";

function Profile({ user, loading }) {
  return (
    <Skeleton loading={loading}>
      <img src={user?.avatar} width={48} height={48} style={{ borderRadius: "50%" }} />
      <h3>{user?.name}</h3>
      <p>{user?.bio}</p>
    </Skeleton>
  );
}

The first render (before your real data arrives) is used to measure the component's dimensions, so make sure children render at their real intended size even with placeholder/empty props (e.g. render an <img> tag even if src is empty, rather than conditionally omitting it).

API

<Skeleton />

| Prop | Type | Default | Description | |-----------------------|-----------------------------------|--------------|----------------------------------------------------| | loading | boolean | — | Whether to show the placeholder. | | children | React.ReactNode | — | The real content to measure and eventually render. | | animation | "pulse" \| "wave" \| "none" | "pulse" | Placeholder animation style. | | shape | "rect" \| "circle" \| "text" | auto | Force a shape instead of using measured border-radius. | | className | string | — | Class applied to the outer wrapper. | | style | React.CSSProperties | — | Inline style merged onto the outer wrapper. | | baseColor | string | "#e2e2e2" | Background color of the shimmer placeholder. | | highlightColor | string | "#f0f0f0" | Highlight color used in the wave animation. | | placeholderClassName| string | — | Class applied to the shimmer placeholder overlay. |

useMeasure()

Low-level hook used internally. Returns { ref, dimensions } — attach ref to any element to get its live { width, height, borderRadius }, updated via ResizeObserver.

How it works

  1. Your children are always rendered (even while "loading"), just with visibility: hidden — this keeps them in the layout so their size can be measured, without showing stale/empty content to the user.
  2. A ResizeObserver tracks the children's rendered box.
  3. A shimmer placeholder is absolutely positioned on top, matching that exact size, until loading becomes false.

Roadmap

  • Auto-detect multiple child shapes (e.g. list of skeleton rows for arrays)
  • Dark mode color presets
  • Optional skip-measurement mode (fixed size skeleton, no invisible render pass)

License

MIT