shimmer

RSE

React Shimmer Div Component - Light, Dark & Custom Modes

Enhance your web applications with the dynamic Shimmer Div Component, available in light and dark modes with customizable sizes.


Shimmer Div Light Mode

<ShimmerDiv mode="light" height={100} width={100} />

<ShimmerDiv mode="light" height={100} width={100} rounded={50} />

Shimmer Div Dark Mode

<ShimmerDiv mode="dark"  height={100} width={100} />

<ShimmerDiv mode="dark" height={100} width={100} rounded={50} />

Shimmer Div Custom Mode

<ShimmerDiv mode="custom"  height={100} width={100} from="#7c3aed" via="#8b5cf6" to="#7c3aed"/>

<ShimmerDiv mode="custom" height={100} width={100} rounded={50} from="#7c3aed" via="#8b5cf6" to="#7c3aed" />

Shimmer Div Loading Mode

<ShimmerDiv mode="light" height={100} width={100} loading={loading} >
	<img src="https://images.pexels.com/photos/33109/fall-autumn-red-season.jpg?cs=srgb&dl=pexels-pixabay-33109.jpg&fm=jpg" style={{ height: "100px", width: "100px" }} />
</ShimmerDiv>

<ShimmerDiv mode="light" height={100} width={100} rounded={50} loading={loading} > <img src="https://images.pexels.com/photos/33109/fall-autumn-red-season.jpg?cs=srgb&dl=pexels-pixabay-33109.jpg&fm=jpg" style={{ height: "100px", width: "100px", borderRadius: "50%"}} /> </ShimmerDiv>

Properties

PropertyTypeRequiredDefault valueDescription
heightnumberYes-The height of the div.
widthnumberYes-The width of the div.
bordernumberNo1pxThe border width of the div.
roundednumberNo0.1emThe border radius of the div.
loadingbooleanNotrueWhether the div is in a loading state.
childrenReactElementNo-Element to load after loading false
mode"light" | "dark" | "custom"Yes-The mode of the div (light, dark, or custom).
from, via, tostringYes (for mode "custom")-The colors used in custom mode.

Take it further

Take full advantage of React Shimmer Effect by experimenting with its extensive features and customization options

Previous

Button

Next

Title