JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<a href="#" class="ui-download-btn">Download marketing kit </a>
</body>
</html>
CSS
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap");
button,
input,
input::-webkit-input-placeholder,
a {
font-family: "Open Sans", sans-serif;
}
.ui-download-btn {
position: relative;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
min-width: 222px;
min-height: 61px;
text-decoration: none;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-weight: 600;
font-size: 14.4828px;
line-height: 20px;
text-align: center;
color: #838383;
border-radius: 12px;
overflow: hidden;
outline: none;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.ui-download-btn:visited {
color: #838383;
}
.ui-download-btn::before {
content: "";
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
background: linear-gradient(108.71deg, rgba(239, 239, 239, 0.5) 39.22%, rgba(255, 255, 255, 0) 90.31%);
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.ui-download-btn::after {
content: "";
position: absolute;
top: 0;
right: 0;
width: 100%;
height: 100%;
background: linear-gradient(108.71deg, rgba(196, 200, 215, 0.5) 39.22%, rgba(255, 255, 255, 0) 90.31%);
opacity: 0;
visibility: hidden;
-webkit-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.ui-download-btn:hover::before, .ui-download-btn:focus::before {
opacity: 0;
visibility: hidden;
}
.ui-download-btn:hover::after, .ui-download-btn:focus::after {
opacity: 1;
visibility: visible;
}