JSFiddle - React, Tailwind, and code Playground

HTML

<label>
    <input type="checkbox" id="checkbox-with-shift"/>
    <span>Click this text while holding shift</span>
</label>

JavaScript

document.getElementById('checkbox-with-shift')
    .addEventListener('click', function(ev) {
        alert("Your last click was while holding shift: "+ev.shiftKey)
    })