# cursor-utilities

> ## Create CUR File from Canvas

Latest version **1.1.0** (published 2018-04-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install cursor-utilities
pnpm add cursor-utilities
yarn add cursor-utilities
bun add cursor-utilities
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-04-18 |
| First published | 2018-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Timm Preetz |
| Maintainers | timm |

## Links

- npm: https://www.npmjs.com/package/cursor-utilities
- npm.io page: https://npm.io/package/cursor-utilities

## Recent versions

- 1.1.0 (latest) — 2018-04-18
- 1.0.0 — 2018-04-18

## README

# Cursor Utilities

## Create CUR File from Canvas

To create a custom cursor for use in any modern browser (Chrome, Firefox, Edge), create a canvas with a dimension of 16x16, 32x32, or 64x64 pixels and then:

```ts
// call the `curObjectURLFromCanvas` function to retrieve an object URL pointing to a `CUR` file containing the canvas' image
const cursorObjectURL = curObjectURLFromCanvas(canvas);

// Use this URL in your inline style (or in a programatically created `StyleSheet`)
body.style.cursor = `url(${cursorObjectURL}), pointer`;
```

---
_Source: https://npm.io/package/cursor-utilities · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
