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

react-skelify

v1.0.4

Published

It is a simple package with zero configuration for usage. It creates skeleton loadings when wrapped around the DOM elements automatically

Readme

React Skeleton Recorder (@recorder/core)

Turn any rendered UI into a faithful skeleton loader automatically. Wrap your content once and get a pixel-accurate skeleton while data is loading — no hand-crafted placeholder trees.

Features

  • Automatic DOM-to-skeleton generation (flex/grid aware)
  • Text-aware ragged line blocks with pulse animation
  • Respects border radius, spacing, and layout
  • Works with absolutely/fixed/sticky positioned elements
  • Light/Dark theming via a single CSS variable
  • Zero CSS dependencies; adds a tiny keyframes helper at runtime

Installation

pnpm add @recorder/core
# or
npm i @recorder/core
# or
yarn add @recorder/core

Quickstart

import { useState } from "react";
import { SkeletonRecorder } from "@recorder/core";

export function ProfileCard() {
  const [loading, setLoading] = useState(true);

  return (
    <SkeletonRecorder isLoading={loading}>
      <article className="card">
        <img className="avatar" />
        <h2>Jane Doe</h2>
        <p>Senior Frontend Engineer</p>
      </article>
    </SkeletonRecorder>
  );
}

When isLoading is true, the original content remains mounted (hidden for measurement) and an auto-generated skeleton is rendered in its place.

API

type Props = {
  children: React.ReactNode;
  isLoading?: boolean;      // Show the generated skeleton when true
  devMode?: boolean;        // Adds a floating "📸 Capture Skeleton" button
  onCapture?: (jsx: React.ReactNode) => void; // Receive captured JSX when clicking the button
};
<SkeletonRecorder
  isLoading={isLoading}
  devMode
  onCapture={(node) => console.log(node)}
>
  {content}
</SkeletonRecorder>

Theming (Light/Dark)

Skeleton color is controlled by the CSS variable --skeleton-base-color and defaults to a light neutral. You can set it globally and/or per theme.

:root { --skeleton-base-color: #e5e7eb; }
@media (prefers-color-scheme: dark) {
  :root { --skeleton-base-color: rgba(255,255,255,.14); }
}

:root[data-theme="light"] { --skeleton-base-color: #e5e7eb; }
:root[data-theme="dark"]  { --skeleton-base-color: #374151; }

To toggle themes in-app, set data-theme on document.documentElement.

document.documentElement.setAttribute("data-theme", "dark");

The component respects prefers-reduced-motion and will disable the pulse animation automatically when users prefer reduced motion.

How it works

  • The component renders your children (optionally hidden when loading) so it can measure real DOM boxes and computed styles.
  • It walks the DOM tree and synthesizes a parallel tree of lightweight divs mirroring layout (flex/grid, padding, gaps, radius).
  • Leaf nodes with text become a stack of ragged lines; media-like nodes (e.g. images) become blocks or circles respecting border radius.
  • A tiny @keyframes pulse is injected once per document for the shimmer effect.

Project structure

Monorepo managed with workspaces:

.
├─ packages/
│  └─ recorder/            # This package
│     ├─ src/
│     │  ├─ components/
│     │  │  ├─ SkeletonRecorder.tsx
│     │  │  └─ SkeletonRenderer.tsx (dev preview)
│     │  └─ utils/
│     │     ├─ generateSkeleton.tsx
│     │     └─ injectPulseAnimation.ts
│     ├─ dist/              # Build output
│     └─ package.json
└─ apps/
   └─ example/              # Next.js demo + docs site

Local development

# From repo root
pnpm i
pnpm -w build           # builds the package
pnpm -C apps/example dev # runs the Next.js demo site at http://localhost:3000

During development you can open /dev in the demo app and use devMode to capture and preview the generated skeleton for arbitrary content.

Contribution guidelines

  • Use TypeScript and keep code self-documenting with descriptive names.
  • Prefer small, focused functions; avoid deep nesting and broad catch-all blocks.
  • Ensure no linter errors; match existing formatting.
  • Add examples to the demo app when introducing features/edge cases.
  • Accessibility: do not remove ARIA attributes; ensure motion is disabled when users prefer reduced motion.

Workflow:

  1. Create a feature branch
  2. Implement changes in packages/recorder and (if relevant) update apps/example
  3. Build and test locally
  4. Open a PR with a clear description and before/after screenshots of skeletons when applicable

Publishing

This package is configured to build to dist/. To publish:

pnpm -C packages/recorder build
cd packages/recorder
npm publish --access public

Ensure peerDependencies match the intended React version.


Made with ❤️ to save you from hand-crafting skeleton UIs.