Alpine.js is a good tool for this, but it can have issues when LV updates the DOM.