Boxes Loader
Loader with moving boxes effect
Usage
import { BoxesLoader } from "react-awesome-loaders";export const BoxesLoaderComponent = () => {return (<><BoxesLoaderboxColor={"#6366F1"}style={{ marginBottom: "20px" }}desktopSize={"128px"}mobileSize={"80px"}/></>);};
Parameters
Below are the parameters for BoxesLoader that you can customize.
| Option | Description | Type | Default |
|---|---|---|---|
| className | class attribute for loader | String | boxesloader |
| boxColor | Color of the boxes | String | #5C8DF6 |
| shadowColor | Color of the boxes shadow | String | #dbe3f4 |
| duration | Duration of animation | Number | 800 |
| size | Size of the logo | String | 64px |
| desktopSize | Size of the logo on desktop | String | (empty) |
| mobileSize | Size of the logo on mobile | String | (empty) |
size,desktopSizeandmobileSizeattributes are defined relative to64pxfor all loaders and it doesn't mean the actual size would be64px. It means all the sizes defined will be w.r.t64px. If you pass128pxthen the size doubles. Also, note that if one of thedesktopSizeandmobileSizeis not defined, then it will use thesizeattribute. Value defined insizeattribute is assigned for mobile devices and loader automatically doubles the size on desktop device.
❤️ Inspired from codepen by Aaron Iker