Content Shimmer to easily create placeholder loading, image loading, card loading, etc .., free to change the colors, speed, sizes, radius and shadow also have few deafult Loding Componets to use. (CardShimmer,ProfileShimmer,SocialShimmer,BulletListShimme
npm install react-content-shimmerbash
npm i --save react-content-shimmer
`
Usage
`jsx
import ContentShimmer from 'react-content-shimmer'
const YourStyleName = () => {
return (
)
}
`
Options
| Prop name and type | Values | Description |
| ------------------------------------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| rows?: number
Defaults to 1 | - | It's used to create multiple loader at once in a page |
| background?: string
Defaults to #eeeeee | - | It's is used to change the background of your ContentShimmer|
| foreground?: string
Defaults to #dddddd | - | It's is used to change the foreground color of your ContentShimmer|
| elevation?: number
Defaults to 0.08 | - | It's is used for background outset shadow to your ContentShimmer|
| speed?: number
Defaults to 1s | - | Controll Speed of animation support value in seconds|
| rounded?: string
Defaults to 0px | - | Curve of your Loader Component in px , percentage (%)...
available for use in |
| style?: object | - | Give extra styling you want accept all css properties
|
| size?: {height? : number, Width? : number} | - | It's used to change the height and width your ContentShimmer only props use while creating custom ContentShimmer |
| radius?: string
Defaults to sm | (xs - sm - md - lg - xl) | It's is used as giving curve from corner only available in . |
| variant?: string
Defaults to rounded| (default - rounded)| Shape for the define Style like
|
| animation?: string
Defaults to wave| (wave - pulse)| Change animation for any of your shimmer or loader|
Example
Plug and play components
#
1. Social Style
#
`jsx
import { SocialShimmer } from 'react-content-shimmer'
const YourStyleName = () => {
return (
)
}
`
!ExampleCode
2. Bullet List Style
#
`jsx
import { BulletListShimmer } from 'react-content-shimmer'
const YourStyleName = () => {
return (
)
}
`
!ExampleCode
3. Code Style
#
`jsx
import { CodeShimmer } from 'react-content-shimmer'
const YourStyleName = () => {
return (
)
}
`
!ExampleCode
4. Profile Style
#
`jsx
import { ProfileShimmer } from 'react-content-shimmer'
const YourStyleName = () => {
return (
)
}
`
!ExampleCode
5. Custom Creation
Custom ContentShimmer workes more well with the css or bootstrap classes Create with this Css Tricks will works Awesome 😎 Live Working Example at the Top
#
`jsx
import ContentShimmer from 'react-content-shimmer'
const YourStyleName = () => {
return (
)
}
``