1.1.1 • Published 4 years ago

@riyazurrazak/react-skeleton v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

react-skeleton

React based Skeleton animation component with full customisable themes.

NPM JavaScript Style Guide

Install

with npm

npm install --save @riyazurrazak/react-skeleton

with yarn

yarn add @riyazurrazak/react-skeleton

Example

CodeSandBox : Demo

Usage

import React from 'react'

import {SkeletonWrapper} from '@riyazurrazak/react-skeleton'

export const Example = ()=>{

  return(
     <SkeletonWrapper isLoading={true}>
          {/** inner content */}
          <p>Async content</p>  
     </SkeletonWrapper>
  )
}

Props

PropertyTypeDefaultDescription
isLoadingboolfalseSet true to loading effect. Set false to render elements inside the SkeletonWrapper
classNamestringnullCustom class to make the skeleton to style as you want
widthstring'auto'width of your skeleton
heightstring'auto'height of your skeleton
circleboolfalsemake skeleton as circle. Note: width and height must be eqaul
waveboolfalsemake skeleton as wave animation
backgroundColorstringrgba(0, 0, 0, 0.11)background of the skeleton
highlightColorstringrgba(0, 0, 0, 0.04)highlightedcolor of the skeleton. Will be effect if wave property is true

License

MIT © RiyazurRazak