Squircle Loader
Loader with rotating cylinder effect
Usage
import { SquircleLoader } from "react-awesome-loaders";export const SquircleLoaderComponent = () => {return (<><SquircleLoader /></>);};
Parameters
Below are the parameters for SquircleLoader that you can customize.
Option | Description | Type | Default |
---|---|---|---|
className | class attribute for loader | String | squircleloader |
color | Primary color of cylinder | String | #EF4444 |
backfaceColor | Color of back face of cylinder | String | #4F46E5 |
alternateColor | Color of alternate face of cylinder | String | #10B981 |
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
,desktopSize
andmobileSize
attributes are defined relative to64px
for 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 pass128px
then the size doubles. Also, note that if one of thedesktopSize
andmobileSize
is not defined, then it will use thesize
attribute. Value defined insize
attribute is assigned for mobile devices and loader automatically doubles the size on desktop device.
❤️ Inspired from codepen by Chris Gannon