Notification Preference Block
A copy-paste settings & preferences component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Settings & PreferencesHTMLCSSany framework
Notify me about
Copy into your project
HTML
<div class="nuda-notif-pref">
<div class="nuda-notif-pref__head">Notify me about</div>
<label class="nuda-notif-pref__row">
<input type="checkbox" checked />
<span class="nuda-notif-pref__box"></span>
<span class="nuda-notif-pref__text">
<span class="nuda-notif-pref__name">Push</span>
<span class="nuda-notif-pref__desc">On this device</span>
</span>
</label>
<label class="nuda-notif-pref__row">
<input type="checkbox" checked />
<span class="nuda-notif-pref__box"></span>
<span class="nuda-notif-pref__text">
<span class="nuda-notif-pref__name">Email</span>
<span class="nuda-notif-pref__desc">hello@nudaui.dev</span>
</span>
</label>
<label class="nuda-notif-pref__row">
<input type="checkbox" />
<span class="nuda-notif-pref__box"></span>
<span class="nuda-notif-pref__text">
<span class="nuda-notif-pref__name">SMS</span>
<span class="nuda-notif-pref__desc">+1 (555) 010-0099</span>
</span>
</label>
</div>CSS
/* Notification Preference Block
Channel checkboxes (push / email / sms).
Customize: --accent, --card-bg */
.nuda-notif-pref {
--accent: #e4ff54;
--card-bg: #0c0c10;
display: flex;
flex-direction: column;
gap: 0.5rem;
padding: 1.25rem;
background: var(--card-bg);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 14px;
width: 100%;
max-width: 420px;
}
.nuda-notif-pref__head {
color: #a0a0a8;
font-size: 0.75rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 0.25rem;
}
.nuda-notif-pref__row {
position: relative;
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.625rem 0.75rem;
border-radius: 10px;
cursor: pointer;
transition: background 0.2s ease;
}
.nuda-notif-pref__row:hover {
background: #111114;
}
.nuda-notif-pref__row input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.nuda-notif-pref__box {
position: relative;
width: 18px;
height: 18px;
border-radius: 5px;
border: 1px solid rgba(255, 255, 255, 0.15);
background: #111114;
flex-shrink: 0;
transition: background 0.2s ease, border-color 0.2s ease;
}
.nuda-notif-pref__box::after {
content: "";
position: absolute;
top: 2px;
left: 6px;
width: 4px;
height: 9px;
border: solid #09090b;
border-width: 0 2px 2px 0;
transform: rotate(45deg) scale(0);
transition: transform 0.2s ease;
}
.nuda-notif-pref__row input:checked + .nuda-notif-pref__box {
background: var(--accent);
border-color: var(--accent);
}
.nuda-notif-pref__row input:checked + .nuda-notif-pref__box::after {
transform: rotate(45deg) scale(1);
}
.nuda-notif-pref__row input:focus-visible + .nuda-notif-pref__box {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.nuda-notif-pref__text {
display: flex;
flex-direction: column;
gap: 0.125rem;
min-width: 0;
}
.nuda-notif-pref__name {
color: #fafafa;
font-size: 0.875rem;
font-weight: 500;
}
.nuda-notif-pref__desc {
color: #63636e;
font-size: 0.75rem;
}
@media (prefers-reduced-motion: reduce) {
.nuda-notif-pref__row,
.nuda-notif-pref__box,
.nuda-notif-pref__box::after {
transition: none;
}
}How to use Notification Preference Block
Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.
Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.