<script>
  let current = 'foo'
</script>

<button class:lg:hover:bg-blue-500={current === 'foo'}>Click me</button>
