<div class="plan-selector">
<label class="plan-card">
<input type="radio" name="plan" checked>
<div class="plan-content">
<span class="plan-title">Standard</span>
<span class="plan-cost">Free</span>
</div>
</label>
<label class="plan-card">
<input type="radio" name="plan">
<div class="plan-content">
<span class="plan-title">Pro</span>
<span class="plan-cost">$19/mo</span>
</div>
</label>
<label class="plan-card">
<input type="radio" name="plan">
<div class="plan-content">
<span class="plan-title">Business</span>
<span class="plan-cost">$49/mo</span>
</div>
</label>
</div>.plan-selector {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
display: flex;
flex-direction: column;
gap: 15px;
max-width: 400px;
margin: 0 auto;
}
.plan-card {
position: relative;
cursor: pointer;
}
.plan-card input {
position: absolute;
opacity: 0;
}
.plan-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border: 2px solid #e5e7eb;
border-radius: 12px;
transition: all 0.2s;
background: #fff;
}
.plan-title {
font-weight: 600;
color: #374151;
font-size: 1.1rem;
}
.plan-cost {
color: #6b7280;
}
/* Checked State */
.plan-card input:checked + .plan-content {
border-color: #3b82f6;
background-color: #eff6ff;
box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}
.plan-card input:checked + .plan-content .plan-title {
color: #2563eb;
}
/* Hover State */
.plan-card:hover .plan-content {
border-color: #3b82f6;
}Nothing to show yetType HTML, CSS or JavaScript and your page appears here.
Click any element to find its code Esc
Check this code before you run it
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
0.00s / 0.00s
Nothing has animated yet. Hover, click or type in the preview and each CSS animation, transition or
element.animate() call shows up here as it plays.