JSFiddle - React, Tailwind, and code Playground

HTML

<div class="button1"></div>
<div class="button2"></div>

CSS

.button1 { position:absolute; left:10px; top:10%; width:10%; height:10%; background:red; }

.button2 { position:absolute; left:10px; top:25%; width:10%; height:10%; background:blue; }

.button1:hover { background:green; }
.button1:hover + .button2 { background:green; }