Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-skeleton-state

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-skeleton-state

Show a skeleton placeholder of your content before your data arrives

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Skeleton

npm version

Show a loading skeleton of your content animated before your content arrived from e.g. API or lazy loading

Example

Installation

npm install --save react-skeleton-state
yarn add react-skeleton-state

Usage

import ReactSkeleton from "react-skeleton-state";

<ReactSkeleton width={200} fontSize={"1rem"} variant="text"></ReactSkeleton>
<ReactSkeleton width={50} height={50} variant="circle"></ReactSkeleton>
<ReactSkeleton width={200} fontSize={"1rem"} variant="text"></ReactSkeleton>
<ReactSkeleton width={200} height={200} variant="rectangle"></ReactSkeleton>

Props

PropTypeDefaultDescription
widthnumber4The width of the skeleton PX
heightnumber4The height of your skeleton PX
variantstring"rectangle"Either "rectangle", "circle" or "text"
fontSizestringnullfontSize if variant is text
borderRadiusnumber4Border radius of the skeleton PX
backgroundColorStartstring"#efefef"Start color state for animation
backgroundColorEndstring"#e4e4e4"End color state for animation
childrenreactNodenullInclude any react children

Keywords

FAQs

Package last updated on 11 Jul 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc