1.0.2 • Published 2 years ago

html-picker v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

node-picker

It's a JavaScript library for interactively picking the DOM elements and displays the HTML tags.

npm version

Install

npm install --save html-picker`

Usage

Create an instance of the htmlPicker class, and call its start() method to start picking. Provide an onHover or onClick callback to get the picked element(s). Call stop() to stop picking and remove the overlay from the DOM.

import { htmlPicker } from "html-picker";

onHover: (el) => console.log(`Hover: ${el}`),
onClick: (el) => console.log(`Click: ${el}`),

const picker = new htmlPicker(onHover, onClick);
picker.start();
picker.stop();