Socket
Book a DemoInstallSign in
Socket

react-skeleton-loaders

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-skeleton-loaders

A customizable React skeleton loader component

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

React Skeleton Loader

A lightweight, customizable React component for rendering skeleton loaders while content is loading.

npm version license downloads

React Skeleton Loader Example

✨ Features

  • Lightweight & customizable
  • Built-in pulse animation
  • Supports circle and rectangular shapes
  • Easily stylable via className and style

📦 Installation

npm install react-skeleton-loaders
yarn add react-skeleton-loaders

🚀 Basic Usage


import React from 'react';
import Skeleton from 'react-skeleton-loaders';

const MyComponent = () => {
  return (
    <div>
      <Skeleton width="100%" height="20px" />
      <Skeleton width="60%" height="20px" style={{ marginTop: 10 }} />
      <Skeleton circle width="40px" height="40px" />
    </div>
  );
};

📚 Full Example


import React from 'react';
import Skeleton from 'react-skeleton-loaders';

const App = () => {
  const posts = [1, 2, 3, 4, 5, 6];

  return (
    <div style={{
      display: 'grid',
      gridTemplateColumns: 'repeat(auto-fill, minmax(500px, 1fr))',
      gap: '20px',
      margin: '10px',
    }}>
      {posts.map((post, index) => (
        <div key={index} style={{ padding: '10px', border: '1px solid #ddd', borderRadius: '8px' }}>
          <Skeleton circle width="40px" height="40px" />
          <Skeleton width="60%" height="20px" />
          <Skeleton width="100%" height="15px" />
          <Skeleton width="100%" height="15px" />
        </div>
      ))}
    </div>
  );
};

export default App;

⚙️ Props

PropTypeDefaultDescription
widthstring | number"100%"Width of the skeleton
heightstring | number"1rem"Height of the skeleton
circlebooleanfalseRenders as a circle
classNamestring""Custom class for styling
styleReact.CSSProperties{}Inline styles

🧪 Development

npm run build

📝 License

MIT License © Victor Olayemi

Keywords

react

FAQs

Package last updated on 10 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.