<theme-switch>An accessible on/off switch built with Lit on top of a native checkbox. Works with the keyboard, too.
Flip the first switch…
npm install @firstprateek/switch// main.js
import '@firstprateek/switch';
document.querySelector('theme-switch')
.addEventListener('change', (e) => console.log(e.detail.checked));
<!-- index.html -->
<theme-switch label="Dark theme"></theme-switch>