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-skeleton-animation-loader

v1.0.1

Published

A simple, customizable, and lightweight skeleton loader component for React. Perfect for displaying loading placeholders while content is being fetched or processed.

Downloads

21

Readme

React Skeleton Animation Loader

A lightweight and customizable React skeleton loader component with smooth animation effects. Ideal for improving user experience during content loading states.

Installation

Install the package using npm or yarn:

npm install react-skeleton-animation-loader

or

yarn add react-skeleton-animation-loader

Usage

Basic Example

import React, { useState, useEffect } from 'react';
import SkeletonLoader from 'react-skeleton-animation-loader';

const ExampleComponent = () => {
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    setTimeout(() => setLoading(false), 3000);
  }, []);

  return (
    <div>
      <SkeletonLoader isLoading={loading}>
        <p>Content loaded!</p>
      </SkeletonLoader>
    </div>
  );
};

export default ExampleComponent;

Props

| Prop | Type | Default | Description | | ---------------- | -------------------- | -------- | -------------------------------------------------------------- | | type | string | 'text' | Specifies the skeleton type ('text', 'image', 'custom'). | | isLoading | boolean | true | Controls the loading state. If true, the skeleton appears. | | children | ReactNode | null | Content to be displayed when isLoading is false. | | skeletonWidth | string or number | '100%' | Custom width for the skeleton loader. | | skeletonHeight | string or number | '100%' | Custom height for the skeleton loader. | | count | number | 1 | Number of skeleton elements (useful for type='custom'). |

Examples

Image Skeleton Loader

import React, { useState, useEffect } from 'react';
import SkeletonLoader from 'react-skeleton-animation-loader';

const ImageExample = () => {
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    setTimeout(() => setLoading(false), 3000);
  }, []);

  return (
    <div>
      <SkeletonLoader isLoading={loading} type="image" skeletonWidth={200} skeletonHeight={200}>
        <img src="https://via.placeholder.com/200" alt="Loaded" width={200} height={200} />
      </SkeletonLoader>
    </div>
  );
};

export default ImageExample;

Custom Skeleton List

import React, { useState, useEffect } from 'react';
import SkeletonLoader from 'react-skeleton-animation-loader';

const ListExample = () => {
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    setTimeout(() => setLoading(false), 3000);
  }, []);

  return (
    <div>
      <SkeletonLoader isLoading={loading} type="custom" count={5} skeletonHeight={20}>
        {[...Array(5)].map((_, index) => (
          <p key={index}>Item {index + 1}</p>
        ))}
      </SkeletonLoader>
    </div>
  );
};

export default ListExample;

Card Skeleton Loader

import React, { useState, useEffect } from 'react';
import SkeletonLoader from 'react-skeleton-animation-loader';

const CardExample = () => {
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    setTimeout(() => setLoading(false), 3000);
  }, []);

  return (
    <div style={{ width: 300, padding: 20, border: '1px solid #ccc', borderRadius: 10 }}>
      <SkeletonLoader isLoading={loading} type="image" skeletonWidth={300} skeletonHeight={180} />
      <br/>
      <SkeletonLoader isLoading={loading} type="text" skeletonHeight={20} />
      <br/>
      <SkeletonLoader isLoading={loading} type="text" skeletonHeight={20} />
      <br/>
      {!loading && <button>Click Me</button>}
    </div>
  );
};

export default CardExample;

Styling

You can customize the animation using CSS. Example:

.skeleton-loader {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

License

MIT