npm.io
2.3.0 • Published 4 weeks ago

@supermousejs/text

Licence
MIT
Version
2.3.0
Deps
0
Vulns
0
Weekly
0
Stars
1

@supermousejs/text

Displays a contextual text label next to the cursor when hovering interactive elements.

Installation

pnpm add @supermousejs/text

Usage

import { Supermouse } from "@supermousejs/core";
import { Text } from "@supermousejs/text";

const app = new Supermouse();

app.use(
  Text({
    offset: [20, 20], // X, Y offset from cursor
    duration: 200 // Fade duration
  })
);

HTML:

<button data-supermouse-text="Click Me">Hover Here</button>

Documentation

Full documentation and interactive playground available at supermouse or check out the repo.