JSFiddle - React, Tailwind, and code Playground

HTML

<div>
  <button>Btn 1</button>
  <button>Btn 2</button>
  <button>Btn 3</button>
</div>

CSS

button {
  width: 150px;
  height: 150px;
}
.active {
  background: url(https://i.ytimg.com/vi/32rG4SKO1_s/maxresdefault.jpg);
  background-size: cover;
}

JavaScript

$('button').on('click', function(){
	$(this).addClass('active').siblings().removeClass('active')
})