Tick to select
Tick to select: a CSS card. Copy the rules, or the prompt that rebuilds it.
CSS
.card-070 {
display: flex;
align-items: flex-start;
gap: 14px;
width: 320px;
padding: 16px 18px;
background: #fff;
border: 2px solid #e5e7eb;
border-radius: 14px;
font-family: system-ui,sans-serif;
color: #111827;
cursor: pointer;
transition: border-color .15s,background .15s
}
.card-070 input {
position: absolute;
opacity: 0;
width: 0;
height: 0
}
.card-070__box {
flex: none;
width: 20px;
height: 20px;
margin-top: 2px;
border: 2px solid #d1d5db;
border-radius: 6px;
display: grid;
place-items: center;
transition: background .15s,border-color .15s
}
.card-070__box::after {
content: "";
width: 6px;
height: 10px;
border: solid #fff;
border-width: 0 2px 2px 0;
transform: rotate(45deg) scale(0);
transition: transform .15s
}
.card-070__text {
display: flex;
flex-direction: column;
gap: 2px
}
.card-070 b {
font-size: 14px
}
.card-070 small {
font-size: 12px;
color: #6b7280
}
.card-070:hover {
border-color: #c7d2fe
}
.card-070:has(input:checked) {
border-color: #4f46e5;
background: #eef2ff
}
.card-070:has(input:checked) .card-070__box {
background: #4f46e5;
border-color: #4f46e5
}
.card-070:has(input:checked) .card-070__box::after {
transform: rotate(45deg) scale(1)
}
.card-070:has(input:focus-visible) {
outline: 2px solid #4f46e5;
outline-offset: 2px
}
HTML
<label class="card-070">
<input type="checkbox">
<span class="card-070__box"></span>
<span class="card-070__text"><b>Weekly digest</b><small>One email every Monday with what changed.</small></span>
</label>Prompt
Create a 320px selectable option card built as a label with a hidden checkbox. Default: white, 2px #e5e7eb border, 14px radius, a custom 20px checkbox square with a 2px #d1d5db border and 6px radius, 14px bold title and 12px #6b7280 description. Use :has(input:checked) on the card to switch the border to indigo #4f46e5, the background to #eef2ff, fill the checkbox indigo and reveal a white checkmark (a rotated border-only pseudo-element scaling from 0 to 1). Hover tints the border #c7d2fe; keyboard focus shows a 2px indigo outline via :has(input:focus-visible).