1.1.0 • Published 4 years ago
react-smooth-cursor v1.1.0
react-smooth-cursor
Smooth cursor library
Install
yarn add react-smooth-cursor
or
npm install react-smooth-cursor
Usage
import React, { Component } from 'react'
import SmoothCursor from 'react-smooth-cursor'
import 'react-smooth-cursor/dist/index.css'
class Example extends Component {
render() {
(
return
<SmoothCursor
// Required
selectors={['antValidCssSelector01','antValidCssSelector02']}
// Optionals
fillColor='#e20c6a'
strokeColor='#000'
strokeWidth={1}
cursorRadius={25}
/>
)
}
}
// or
const Example = () => {
return(
<SmoothCursor
// Required
selectors={['antValidCssSelector01','antValidCssSelector02']}
// Optionals
fillColor='#e20c6a'
strokeColor='#000'
strokeWidth={1}
cursorRadius={25}
/>
)
}
General Props
Circle Cursor Props
Option | Type | Description | Default |
---|---|---|---|
circleRadius | number | Cursor radius | 25 |
Square Cursor Props
Option | Type | Description | Default |
---|---|---|---|
shapeSize | number | Square size | 25 |
Alien Cursor Props
Option | Type | Description | Default |
---|---|---|---|
shapeSize | number | Alien size | 25 |
License
MIT © mustafademirtas