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

boneyard-js

v1.7.5

Published

Pixel-perfect skeleton loading screens. Wrap your component in <Skeleton> and boneyard snapshots the real DOM layout — no manual descriptors, no configuration.

Downloads

25,481

Readme

boneyard

Pixel-perfect skeleton loading screens, extracted from your real DOM.

Quick start

npm install boneyard-js
import { Skeleton } from 'boneyard-js/react'

<Skeleton name="blog-card" loading={isLoading}>
  <BlogCard data={data} />
</Skeleton>
npx boneyard-js build
// app/layout.tsx
import './bones/registry'
<script lang="ts">
  import Skeleton from 'boneyard-js/svelte'
  import ProfileCard from './ProfileCard.svelte'
</script>

<Skeleton name="profile-card" loading={isLoading}>
  {#snippet fallback()}
    <p>Loading profile...</p>
  {/snippet}

  <ProfileCard />
</Skeleton>

Done. See the full documentation for all props, CLI options, and examples.

Layout APIs

You do not need to change your existing usage to benefit from the compiled layout engine.

computeLayout(descriptor, width)

This is the default API. It is backward compatible and still the right choice for most callers.

import { computeLayout } from "boneyard-js";

const result = computeLayout(descriptor, 375);

What happens:

  • The first call compiles the descriptor tree and measures its text nodes.
  • Later calls with the same descriptor object reuse that compiled tree.
  • This means the default API becomes fast after first use.

compileDescriptor(descriptor) + computeLayout(compiled, width)

Use this when you want explicit control over the cold step.

import { compileDescriptor, computeLayout } from "boneyard-js";

const compiled = compileDescriptor(descriptor);

const mobile = computeLayout(compiled, 375);
const tablet = computeLayout(compiled, 768);
const desktop = computeLayout(compiled, 1280);

What this gives you:

  • The descriptor is compiled up front.
  • Every later computeLayout() call is guaranteed to use the hot relayout path.
  • This is useful when you know the same descriptor will be reused many times.

Which one should you use?

Use computeLayout(descriptor, width) when:

  • you want the simplest API
  • you already have working code and do not want to change it
  • you only relayout a descriptor a small number of times

Use compileDescriptor(descriptor) when:

  • you render the same skeleton at multiple breakpoints
  • you keep a registry of descriptors in memory
  • you relayout repeatedly in SSR, responsive tooling, or animation-heavy flows
  • you want to benchmark cold work separately from hot relayouts

If your app already calls computeLayout(descriptor, width), you do not have to rewrite it. compileDescriptor() exists for callers who want predictable warm performance and explicit ownership of the compiled artifact.

Mutating descriptors

If you mutate the same descriptor object in place, the engine will detect the change and rebuild its compiled state automatically on the next layout call.

If you want to force that rebuild immediately, you can call invalidateDescriptor(descriptor) before the next computeLayout().

License

MIT