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

react-awesome-skeleton

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-awesome-skeleton

better loading effect

  • 0.0.40
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28
increased by600%
Maintainers
1
Weekly downloads
 
Created
Source

NPM

React-Awesome-Skeleton

基于React16+、适用于单页应用

Example

Demo Page

Install

NPM or YARN

npm install react-awesome-skeleton --save

or

yarn add  react-awesome-skeleton --save

Use in Compoent

import Skeleton from "react-awesome-skeleton"
## 引入样式
import "react-awesome-skeleton/lib/main.min.css"

### In component 
<Skeleton />

API

loading

loading: boolean 是否展示该组建 默认true

    <Skeleton loading={true} />

active

loading: boolean 是否展示动画 默认false

    <Skeleton active={true} />

paragraph

paragraph: SkeletonParagraphProps|boolean 线条配置 默认true

    <Skeleton paragraph={true}/>
SkeletonParagraphProps 参数
    rows?:number;  //行数 
    width?:number | string   //宽度
    style?:object   //对应样式

    <Skeleton paragraph={style:{height:'20px'},rows:5,width:'60px'}/>

title

title: SkeletonTitleProps|boolean 线条配置 默认true

    <Skeleton paragraph={true}/>
SkeletonTitleProps 参数
    width?:number | string  宽度
    style?:object  对应样式

    <Skeleton paragraph={style:{height:'20px'},rows:5,width:'60px'}/>

avatar

title: SkeletonAvatarProps|boolean 线条配置 默认true

    <Skeleton paragraph={true}/>
SkeletonAvatarProps 参数
    width:  宽度
    size?: 'large' | 'small' | 'default' | number;   //默认large
    shape?: 'circle' | 'square'; //默认circle
    order?: number   //排在左边或者右边 默认是0 左边

    <Skeleton paragraph={style:{height:'20px'},rows:5,width:'60px'}/>

Keywords

FAQs

Package last updated on 22 Nov 2019

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