Notification Item
A copy-paste notification center component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.
Notification CenterHTMLCSSany framework
Sara Linde commented on your PR
2 min agoCopy into your project
HTML
<div class="nuda-notifitem is-unread">
<span class="nuda-notifitem__avatar"></span>
<div class="nuda-notifitem__body">
<div><strong>Sara Linde</strong> commented on your PR</div>
<span>2 min ago</span>
</div>
<span class="nuda-notifitem__unread"></span>
</div>CSS
.nuda-notifitem {
position: relative;
display: flex;
align-items: center;
gap: 12px;
padding: 12px 14px 12px 16px;
background: rgba(255,255,255,.02);
border: 1px solid rgba(255,255,255,.06);
border-radius: 10px;
width: 100%;
max-width: 280px;
cursor: pointer;
transition: background .2s;
}
.nuda-notifitem:hover {
background: rgba(255,255,255,.04);
}
.nuda-notifitem.is-unread {
background: rgba(228,255,84,.04);
}
.nuda-notifitem__avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: linear-gradient(135deg,#9d6dff,#ff6dd4);
flex-shrink: 0;
}
.nuda-notifitem__body {
flex: 1;
font-size: 12px;
color: #a0a0a8;
}
.nuda-notifitem__body strong {
color: #fafafa;
}
.nuda-notifitem__body span {
display: block;
color: #63636e;
font-size: 10px;
margin-top: 2px;
}
.nuda-notifitem__unread {
position: absolute;
left: 6px;
top: 50%;
transform: translateY(-50%);
width: 6px;
height: 6px;
border-radius: 50%;
background: #e4ff54;
box-shadow: 0 0 6px #e4ff54;
animation: _unreadPulse 2s ease-in-out infinite;
}
@keyframes _unreadPulse {
0%,100% {
opacity: 1;
}
50% {
opacity: .5;
}
}
@media (prefers-reduced-motion:reduce) {
.nuda-notifitem__unread {
animation: none;
}
}
How to use Notification Item
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.