JSFiddle - React, Tailwind, and code Playground
by Vadim
HTML
<input type="color" id="backgroundColorInput">
JavaScript
window.onload = () => {
const element = document.querySelector('#backgroundColorInput');
const body = document.querySelector('body');
element.addEventListener('change', (event) => {
body.style.background = element.value;
});
};