icursor
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Helping you to curstomize your cursor in web looks like cursor in iPad.

Usage

npm i icursor
import 'icursor/main.css'
import { createCursor } from 'icursor'

// only support class selector right now
createCursor('.btn')

createCursor will generate an iCursor, which can fuse into the element that has btn class

or you can customize your iCursor style, when cursor hover on element with class btn, it will have the style of btn-class

import 'icursor/main.css'
import { createCursor } from 'icursor'

createCursor({ '.btn': 'btn-class' })

You should import icursor/main.css as early as possible, or at least import icursor/main.css before your custom stylesheet to make sure that your own css can work.

Todo

  • refactor cursor inner with canvas or maybe svg

Readme

Keywords

none

Package Sidebar

Install

npm i icursor

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

2.7 kB

Total Files

6

Last publish

Collaborators

  • yuusheng7