🖱️ Cursor loader component.
Install the @react-sandbox/cursor-loader package:
npm install @react-sandbox/cursor-loader
Import the CursorLoader component:
importReact,{useState}from'react'importCursorLoaderfrom'@react-sandbox/cursor-loader'functionApp(){const[load,setLoad]=useState(0)return(<div><CursorLoaderload={load}/></div>)}| Prop | Type | Default | Description |
|---|---|---|---|
load | number | required | Load/progress (between 0 and 100) |
color | string | '#01D45B' | Color of loader |
size | 'sm' | 'md' | 'lg' | 'sm' | Size of loader |
trailDelay | 0 | 100 | 200 | 300 | 500 | 300 | Cursor trail delay |
onComplete | function | - | Callback function on completion |
className | string | - | CSS classes |
style | React.CSSProperties | - | CSS styles |
pnpm install
pnpm dev
pnpm test
Inside test/:
pnpm install
pnpm dev
MIT
