Embed styles and script
<script src="https://cdn.jsdelivr.net/gh/melmacaluso/hilite.js/build/index.js"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/gh/melmacaluso/hilite.js/build/index.css"
/>
Create your custom Hilite class
const { Hilite } = window.Hilite;
npm i @melmacaluso/hitlite.js
import Hilite from '@melmacaluso/hilite.js';
Create a flow
const exampleFlow = new Hilite([
{
target: document.querySelector('.example1'),
message: 'this is an example 1',
},
{
target: document.querySelector('.example2'),
message: 'this is an example 2',
},
]);
Start or finish the flow
exampleFlow.start();
// or
exampleFlow.endOfFlow();