JSFiddle - React, Tailwind, and code Playground

by Jorge Polanco

HTML

<div class="holdingbox">
<span class="rightbox">
<span class="content">Kenyér</span>
</span>
 <span class="leftbox">></span>

CSS

div {
    display : inline-block;
}
.holdingbox {
    position: relative;
    top: 0;
    margin-left: 100px;
}

.leftbox {
    position: relative;
    top: 0;
    left: 0;
    display: inline-block;
    font-size: 24px;
    background-color: #ac193d;
    color: #FFF;
    font-weight: bold;
    padding: 1px;
}
.rightbox {
    position: relative;
    display: inline-block;
    overflow: hidden;
    width: 0;
    height: 30px;
    vertical-align: top;
    margin-right: 0;
}
.content{
    width: 100px;
    position: absolute;
    background-color: #ac193d;
    height: 29px;
    left: 0;
    top: 0;
    right: 0;
    color: #FFF;
    padding-left: 5px;
}

JavaScript

$('.holdingbox').hover(function(){
        $('.rightbox').stop().animate({width: '90px'}, 1000)
    }, function(){
        $('.rightbox').stop().animate({width: '-0'}, 1000)
  });