JSFiddle - React, Tailwind, and code Playground
HTML
<div class="outer part">
<div class="part icon-part">IKON</div>
<div class="part text-part">Tekst</div>
<div class="part arrow-part" >-></div>
<div class="bottom-button-line">
</div>
</div>
<br>
<br>
<button>IKON TEKST</button>
CSS
.part
{
display: inline-block;
}
.outer
{
border:1px solid black;
padding-bottom: 0px;
padding-top: 5px;
width: 300px;
position: relative;
}
.icon-part
{
padding-left:15px;
}
.text-part
{
padding-left: 5px;
}
.arrow-part
{
position: absolute;
right: 10px;
top: -17px;
opacity: 0;
transition: all 0.5s ease;
}
.outer:hover .arrow-part
{
opacity: 1;
right: 10px;
top: 7px;
transition: all 0.5s ease-out;
}
.bottom-button-line
{
margin-top: 5px;
height: 5px;
background-color: blue;
width: 0px;
transition: all 0.6s ease;
}
.outer:hover .bottom-button-line
{
width: 300px;
transition: all 1s ease-out;
}
button {
border: 1px solid #000;
background: 0;
background-color: #fff;
font-size: 16px;
width: 300px;
font-family: Times Roman;
text-align: left;
padding: 0.3em 2.5em 0.63em 1em;
position: relative;
transition: all 0.6s ease;
overflow: hidden;
}
button:after {
content: "->";
font-size: 16px;
width: 1.5em;
position: absolute;
right: 0.3em;
top: -2.5em;
transition: all 0.6s ease;
}
button:before {
content: "";
position: absolute;
height: 0.33em;
background-color: blue;
left: 0;
width: 0;
bottom: 0;
transition: all 1s ease;
}
button:hover:after {
top: 0.28em;
}
button:hover:before {
width: 300px;
}