# @yerkopalma/cursor

> Custom cursor component

Latest version **1.1.2** (published 2020-02-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @yerkopalma/cursor
pnpm add @yerkopalma/cursor
yarn add @yerkopalma/cursor
bun add @yerkopalma/cursor
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2020-02-20 |
| First published | 2020-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yerkopalma |
| Keywords | svelte |

## Links

- npm: https://www.npmjs.com/package/@yerkopalma/cursor
- Repository: Custom cursor component
- npm.io page: https://npm.io/package/@yerkopalma/cursor

## Dependencies (2)

- [svelte-css-vars](https://npm.io/package/svelte-css-vars.md) 0.0.1
- [paper-jsdom-canvas](https://npm.io/package/paper-jsdom-canvas.md) 0.12.4

## Recent versions

- 1.1.2 (latest) — 2020-02-20
- 1.1.1 — 2020-02-20
- 1.1.0 — 2020-02-20
- 1.0.1 — 2020-02-19
- 1.0.0 — 2020-02-19

## README

# @yerkopalma/cursor

Custom cursor component

## Usage

```svelte
<script>
  import Cursor from '@yerkopalma/cursor'
</script>

<Cursor />
```

## Install

```bash
npm install --save-dev @yerkopalma/cursor
```

## API

### `Cursor` component

The default export is the svelte component adding it into your 
page will affect the your whole site. You can also set the following properties:

- `global: boolean = true` => Set to false to change the cursor element only on the parent component.
- `type: ['dot', 'spot', 'ring', 'circle', 'cross', 'minus']` => Predefined types of cursor, defaults to dot.
- `color: string` => A valid css color for the cursor. 

### actions

If you want a different cursor on hover for specific elements, you should 
use predefined actions on those elements, example:

```svelte
<script>
import { magneticCursor } from '@yerkopalma/cursor'
</script>

<a use:magneticCursor>magnetic</a>
```

Availaible actions are:

- magneticCursor
- dotCursor
- crossCursor
- minusCursor
- borderCursor

Also, you can define custom actions for custom hovers

TODO: Document custom actions

## License
MIT

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