JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<svg id="menu" x="0px" y="0px" width="71.39px" height="71.39px" viewBox="0 0 71.39 71.39" enable-background="new 0 0 71.39 71.39" xml:space="preserve">
  <polygon id="nut" fill="#0000ff" points="66.605,53.541 35.694,71.388 4.784,53.541 4.784,17.849 35.694,0.002 66.605,17.849"/>
</svg>

CSS

#nut {
    transform-origin: center center;
    transform-style: preserve-3D;
    transition: all 1s ease;
}

.spin {
  transform: rotate(180deg);
}

JavaScript

$('#menu').hover(
  function () {
    $('#nut').addClass('spin');
  },
  function () {
    $('#nut').removeClass('spin');
  }
);