Newsletter card
A bold black-bordered card with an email box and a button.
A bold black-bordered card with an email box and a button.
<!--
From Uiverse.io by 0xnihilism: https://uiverse.io/0xnihilism/nasty-husky-13
MIT License, Copyright (c) 2023 Uiverse.io. The licence is at the foot of this file: keep it with the code.
Changed for Tastebud: colours moved to the Figma palette and demo text in plain English.
-->
<div class="card">
<span class="card__title">Newsletter</span>
<p class="card__content">
One short design idea in your inbox every week.
</p>
<form class="card__form">
<input required="" type="email" placeholder="Your email" />
<button class="card__button">Click me</button>
</form>
</div>
<style>
/* From Uiverse.io by 0xnihilism - Tags: newsletter, card, light, box-shadow, hover button, cool card, brutalism */
.card {
width: 300px;
padding: 20px;
background: #fff;
border: 6px solid #000;
box-shadow: 12px 12px 0 #000;
transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
transform: translate(-5px, -5px);
box-shadow: 17px 17px 0 #000;
}
.card__title {
font-size: 32px;
font-weight: 900;
color: #000;
text-transform: uppercase;
margin-bottom: 15px;
display: block;
position: relative;
overflow: hidden;
}
.card__title::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 90%;
height: 3px;
background-color: #000;
transform: translateX(-100%);
transition: transform 0.3s;
}
.card:hover .card__title::after {
transform: translateX(0);
}
.card__content {
font-size: 16px;
line-height: 1.4;
color: #000;
margin-bottom: 20px;
}
.card__form {
display: flex;
flex-direction: column;
gap: 15px;
}
.card__form input {
padding: 10px;
border: 3px solid #000;
font-size: 16px;
font-family: inherit;
transition: transform 0.3s;
width: calc(100% - 26px); /* Adjust for padding and border */
}
.card__form input:focus {
outline: none;
transform: scale(1.05);
background-color: #000;
color: #ffffff;
}
.card__button {
border: 3px solid #000;
background: #000;
color: #fff;
padding: 10px;
font-size: 18px;
left: 20%;
font-weight: bold;
text-transform: uppercase;
cursor: pointer;
position: relative;
overflow: hidden;
transition: transform 0.3s;
width: 50%;
height: 100%;
}
.card__button::before {
content: "Sure?";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 105%;
background-color: #3ed99d;
color: #000;
display: flex;
align-items: center;
justify-content: center;
transform: translateY(100%);
transition: transform 0.3s;
}
.card__button:hover::before {
transform: translateY(0);
}
.card__button:active {
transform: scale(0.95);
}
@keyframes glitch {
0% {
transform: translate(2px, 2px);
}
25% {
transform: translate(-2px, -2px);
}
50% {
transform: translate(-2px, 2px);
}
75% {
transform: translate(2px, -2px);
}
100% {
transform: translate(2px, 2px);
}
}
.glitch {
animation: glitch 0.3s infinite;
}
</style>
<!--
MIT License
Copyright (c) 2023 Uiverse.io
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
Changed for this site: Colours moved to the Figma palette and demo text in plain English.