Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuusheng/icursor
Make your cursor in web looks like cursor in iPad
https://github.com/yuusheng/icursor
cursor ios web
Last synced: 2 days ago
JSON representation
Make your cursor in web looks like cursor in iPad
- Host: GitHub
- URL: https://github.com/yuusheng/icursor
- Owner: yuusheng
- Created: 2022-12-03T15:41:17.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-20T10:32:36.000Z (almost 2 years ago)
- Last Synced: 2024-04-27T18:04:34.667Z (7 months ago)
- Topics: cursor, ios, web
- Language: TypeScript
- Homepage: https://icursor.yuusheng.im
- Size: 126 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Helping you to curstomize your cursor in web looks like cursor in iPad.## Usage
```bash
npm i icursor
``````js
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`
```js
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