JSFiddle - React, Tailwind, and code Playground
HTML
<h1>Your projects</h1>
<ul>
<li>
<a href="#" data-label="Morning Coffee Routine"><span>Morning Coffee Routine</span></a>
</li>
<li>
<a href="#" data-label="Grocery Shopping List"><span>Grocery Shopping List</span></a>
</li>
<li>
<a href="#" data-label="Weekly Exercise Schedule"><span>Weekly Exercise Schedule</span></a>
</li>
<li>
<a href="#" data-label="Dinner Recipes To Try"><span>Dinner Recipes To Try</span></a>
</li>
<li>
<a href="#" data-label="Evening Relaxation Activities"><span>Evening Relaxation Activities</span></a>
</li>
</ul>
CSS
html, body { height: 100%; margin: 0; padding: 0; }
body { font-family: sans-serif; height: 100%; display: flex; align-items: flex-start; justify-content: center; background-color: #ffffee; flex-direction: column; padding: 0 15%; min-height: 500px; }
h1 {
font-size: 0.6rem;
font-weight: normal;
text-transform: uppercase;
letter-spacing: 3px;
color: #666;
width: 100%;
margin-left: 1rem;
margin-bottom: 1rem;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
a {
font-weight: bold;
font-size: 1.5rem;
text-decoration: none;
padding: 0.5rem 1rem;
display: flex;
flex-direction: column;
color: #282828;
position: relative;
overflow: hidden;
}
a span {
transition: translate 150ms ease-in-out;
}
a::after {
content: attr(data-label);
position: absolute;
top: 3rem;
left: 1rem;
transition: translate 150ms ease-in-out;
color: #666600;
}
a:hover,
a:focus {
background-color: #eeeedd;
}
a:hover::after,
a:focus::after,
a:hover span,
a:focus span {
translate: 0 -2.5rem;
}