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

dead-lock-skeleton

v1.0.1

Published

Create automated skeleton loading screens in React with a single import wrapper.

Readme

dead-lock-skeleton ⚙️

npm version bundle size license

A lightweight, zero-dependency React library to instantly convert any React component tree into a beautiful, fluid shimmer skeleton loader with a single import wrapper.

Unlike traditional skeleton libraries, dead-lock-skeleton uses CSS layout-locking to prevent jarring content shifts, preserving your design's exact line heights, dimensions, and typography.


Key Features

  • Zero Setup: Wrap your existing components; no need to create separate, duplicate skeleton mockups.
  • 🎯 No Layout Shift: Retains the exact dimensions, text alignment, and spacing of your active UI.
  • 🎨 Fully Customizable: Adjust skeleton colors, shimmer speed, and corner rounding via React props or CSS custom properties.
  • 🌗 Dark Mode Ready: Seamlessly responds to dark themes out of the box.
  • 🚀 Performance First: Powered by hardware-accelerated CSS keyframe animations—zero Javascript overhead at render time.
  • 🛠️ Opt-In/Opt-Out Control: Easily exclude specific buttons, icons, or badges from being skeletonized using helper classes.

Installation

npm install dead-lock-skeleton

Import Styles

Import the required CSS once at the entry point of your React application (usually main.tsx, index.tsx, or _app.tsx):

import 'dead-lock-skeleton/dist/style.css';

Quick Start (Usecase in React)

Wrap your component with <DeadLockSkeleton> (or alias <AutoSkeleton>) and control the skeleton screen using the loading prop:

import React, { useState, useEffect } from 'react';
import { DeadLockSkeleton } from 'dead-lock-skeleton';

function UserProfileCard() {
  const [loading, setLoading] = useState(true);
  const [user, setUser] = useState<any>(null);

  useEffect(() => {
    fetch('/api/user')
      .then((res) => res.json())
      .then((data) => {
        setUser(data);
        setLoading(false);
      });
  }, []);

  return (
    <DeadLockSkeleton loading={loading} theme="dark">
      <div className="profile-card">
        {/* Adds circle shape helper */}
        <img 
          src={user?.avatar} 
          className="avatar skeleton-circle" 
          alt={user?.name} 
        />
        <h3>{user?.name}</h3>
        <p>{user?.bio}</p>
        
        {/* Dynamic elements you don't want to turn into skeletons */}
        <span className="badge skeleton-exclude">
          🔥 Featured
        </span>
        
        <button className="btn">Send Invite</button>
      </div>
    </DeadLockSkeleton>
  );
}

API Reference

1. DeadLockSkeleton (alias AutoSkeleton)

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | loading | boolean | Required | When true, automatically overlays all typography, media, and input elements with shimmer loaders. | | theme | 'light' \| 'dark' | System | Forces a specific theme. By default, it detects user preferences (prefers-color-scheme). | | skeletonColor | string | #e2e8f0 | Overrides the base skeleton background color. | | shimmerColor | string | #f1f5f9 | Overrides the linear gradient shimmer wave highlight color. | | duration | string | 1.5s | Overrides the animation duration (e.g. 0.8s, 2s). | | borderRadius | string | 6px | Overrides the default skeleton box border-radius. | | as | React.ElementType | 'div' | The wrapping DOM element (e.g., 'div', 'section', 'article'). |

2. Standalone Skeleton

For custom mockups or fully customized loading layouts outside the auto-wrapper.

| Prop | Type | Default | Description | | :--- | :--- | :--- | :--- | | width | string \| number | 100% | Width of the placeholder (e.g., 120, "80px", "100%"). | | height | string \| number | 16px | Height of the placeholder. | | circle | boolean | false | Convenience toggle to force a circular shape (border-radius: 50%). | | borderRadius | string \| number | 6px | Specific border-radius for this component. |


Selective Styling & Tuning

To ensure your layout-locked skeleton looks outstanding, the library supports simple utility tokens:

Exclusions (skeleton-exclude / [data-skeleton-exclude])

Sometimes, components like dynamic badges, status indicators, or loaded static elements should remain visible instead of skeletonizing. Simply attach the class or data attribute:

<span className="status-badge skeleton-exclude">ONLINE</span>

Circle Shapes (skeleton-circle / [data-skeleton-shape="circle"])

Ensures avatars and circular icons receive a circular mask instead of rounded rectangular corners:

<img src={avatar} className="skeleton-circle" />

CSS Variables Theme Configuration

You can also control skeleton loaders globally using CSS variables within your stylesheet:

:root {
  --skeleton-bg: #cbd5e1;
  --skeleton-shimmer: #f8fafc;
  --skeleton-duration: 1.2s;
  --skeleton-radius: 12px;
}