@react-sandbox/cursor-loader
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

@react-sandbox/cursor-loader

Build status Build size Package 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:

import React, { useState } from 'react'
import CursorLoader from '@react-sandbox/cursor-loader'

function App() {
  const [load, setLoad] = useState(0)

  return (
    <div>
      <CursorLoader load={load} />
    </div>
  )
}

Props

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

Development

Local

pnpm install
pnpm dev

Tests

pnpm test

Example

Inside test/:

pnpm install
pnpm dev

License

MIT

Package Sidebar

Install

npm i @react-sandbox/cursor-loader

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

20.3 kB

Total Files

11

Last publish

Collaborators

  • williamgrosset