JSFiddle - React, Tailwind, and code Playground

HTML

<ul>
    <li>menu item</li>
</ul>

CSS

li {
    background-color: white;
    background: linear-gradient(to top, grey, grey) no-repeat white 0 -5em;
    border: 2px solid grey;
    color: black;
    cursor: pointer;
    display: inline-block;
    padding: 1em;
    transition: background-position 0.4s linear, color 0.2s 0.2s;
}

li:hover {
    color: white;
    background-position: 0 0;
}