Skip to content

Repository files navigation

Build statusDependenciesBuild sizePackage downloads

Example

🖱️ Cursor loader component.

Usage

Install

Install the @react-sandbox/cursor-loader package:

npm install @react-sandbox/cursor-loader

Import

Import the CursorLoader component:

importReact,{useState}from'react'importCursorLoaderfrom'@react-sandbox/cursor-loader'functionApp(){const[load,setLoad]=useState(0)return(<div><CursorLoaderload={load}/></div>)}

Props

PropTypeDefaultDescription
loadnumberrequiredLoad/progress (between 0 and 100)
colorstring'#01D45B'Color of loader
size'sm' | 'md' | 'lg''sm'Size of loader
trailDelay0 | 100 | 200 | 300 | 500300Cursor trail delay
onCompletefunction-Callback function on completion
classNamestring-CSS classes
styleReact.CSSProperties-CSS styles

Development

Local

pnpm install
pnpm dev

Tests

pnpm test

Example

Inside test/:

pnpm install
pnpm dev

License

MIT

Used by

Contributors

Languages