#149 ui light mobile: native-first Communication & Triage

Grouped Priority Notification Center

Priority-grouped notification inbox (Urgent / Today / Earlier) with All/Unread/Snoozed filters, per-item Snooze menus, and Undo.

Inspired by Knock ↗

Download .html
Fullscreen ↗

WHY THIS AESTHETIC IS UNIQUE

Prevents alert fatigue by separating Urgent incidents from Today and Earlier updates, offering one-tap Snooze presets (1h, Tomorrow 9am, Next week) and reversible archive/read actions.

BEST FOR

SaaS in-app notification feeds and activity centersOn-call incident and CI/CD alert triageApproval workflows and review remindersMulti-channel collaboration platforms

TAGS

COLOR PALETTE (CLICK TO COPY HEX)

TYPOGRAPHY

Display
Inter
Body
Inter
Mono
JetBrains Mono
Scale
18px header title, 11px uppercase priority group headers, 14px notification titles, 12px relative timestamps.

Google Fonts Stylesheet ↗

ARCHITECTURE & MOBILE NOTES

LAYOUT

Centered 760px feed container with sticky filter tabs (All / Unread / Snoozed), bulk Mark All Read button, and priority-grouped cards with inline action pills.

INTERACTION

Click Snooze on any item to pick 1 hour, Tomorrow 9am, or Next week; toggle Read/Unread or Archive with a floating Undo toast; filter tabs update live counts.

MOBILE

Maintains >=44px touch targets across filter tabs, snooze presets, and per-item actions with zero horizontal overflow at 390px.

AI AGENT GUARDRAILS

DO

  • Group notifications by urgency/recency (Urgent, Today, Earlier) rather than a flat wall of alerts.
  • Always pair Archive and Snooze actions with an immediate Undo toast.
  • Provide a one-click 'Mark all read' action when unread items exist.

DON'T

  • Never hide Snooze or Mark Read strictly behind desktop hover states.
  • Avoid red badge overload—reserve high-urgency crimson strictly for Urgent-tier items.
STANDALONE SOURCE · demos/priority-notification-snooze.html (18.9 KB)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Relay Inbox — Grouped Priority Notifications &amp; Snooze</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
  :root {
    --bg: #F4F5FA;
    --surface: #FFFFFF;
    --mist: #ECEEF7;
    --violet: #6D28D9;
    --violet-soft: #EDE9FE;
    --violet-mid: #7C3AED;
    --urgent: #DC2626;
    --urgent-soft: #FEE2E2;
    --amber: #B45309;
    --amber-soft: #FEF3C7;
    --ink: #181825;
    --muted: #64667B;
    --border: rgba(24, 24, 37, 0.09);
    --radius: 14px;
    --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
  }

  .page {
    max-width: 820px;
    margin: 0 auto;
    padding: 28px 18px 96px;
  }

  .inbox-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 12px 36px rgba(34, 24, 72, 0.06);
    overflow: visible;
  }

  .inbox-head {
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .head-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
  }

  .title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .bell-badge {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #6D28D9, #8B5CF6);
    color: #fff;
    display: grid;
    place-items: center;
  }

  .title-wrap h1 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .title-wrap p {
    font-size: 0.78rem;
    color: var(--muted);
  }

  .mark-all-btn {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--violet);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .mark-all-btn:hover { background: var(--violet-soft); }

  .tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }

  .tab {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--muted);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
  }

  .tab.active {
    background: var(--violet);
    color: #fff;
    border-color: var(--violet);
  }

  .tab-count {
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    background: rgba(24, 24, 37, 0.08);
  }

  .tab.active .tab-count {
    background: rgba(255, 255, 255, 0.22);
  }

  /* Groups */
  .groups {
    padding: 8px 0 12px;
  }

  .group-label {
    padding: 12px 22px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .group-label.urgent { color: var(--urgent); }

  .group-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
  }

  .notif {
    position: relative;
    padding: 14px 22px;
    border-top: 1px solid rgba(24, 24, 37, 0.06);
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 13px;
    align-items: start;
    transition: background 0.14s ease;
  }

  .notif:hover { background: #FAF9FE; }
  .notif.unread { background: #F7F5FF; }
  .notif.unread:hover { background: #F1EDFF; }

  .notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    position: relative;
  }

  .notif.unread .notif-icon::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--violet);
    border: 2px solid #fff;
  }

  .notif-content { min-width: 0; }

  .notif-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 3px;
  }

  .notif-desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.48;
    margin-bottom: 6px;
  }

  .notif-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.74rem;
    color: var(--muted);
  }

  .pill-tag {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--mist);
    color: var(--ink);
  }

  .pill-urgent { background: var(--urgent-soft); color: var(--urgent); }
  .pill-snooze { background: var(--amber-soft); color: var(--amber); }

  .notif-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.14s ease;
  }

  .icon-btn:hover {
    background: var(--mist);
    color: var(--ink);
    border-color: var(--border);
  }

  .icon-btn.active {
    background: var(--violet-soft);
    color: var(--violet);
    border-color: rgba(109, 40, 217, 0.25);
  }

  /* Snooze Popover */
  .snooze-menu {
    position: absolute;
    top: 48px;
    right: 0;
    width: 196px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(24, 24, 37, 0.16);
    padding: 6px;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .snooze-opt {
    min-height: 44px;
    padding: 0 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }

  .snooze-opt:hover { background: var(--violet-soft); color: var(--violet); }
  .snooze-opt small { color: var(--muted); font-size: 0.72rem; }

  .empty {
    padding: 56px 24px;
    text-align: center;
    color: var(--muted);
  }

  .empty h2 {
    font-size: 1.05rem;
    color: var(--ink);
    margin-bottom: 6px;
  }

  /* Undo Toast */
  .toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%) translateY(90px);
    background: #1C192E;
    color: #F4F5FA;
    padding: 8px 10px 8px 16px;
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.84rem;
    z-index: 60;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
    max-width: calc(100vw - 24px);
  }

  .toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .undo-btn {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    border: none;
    background: #8B5CF6;
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
  }

  @media (max-width: 600px) {
    .page { padding: 12px 10px 88px; }
    .inbox-head { padding: 14px 14px 12px; }
    .group-label { padding: 10px 14px 6px; }
    .notif {
      padding: 12px 14px;
      grid-template-columns: 36px 1fr;
      gap: 10px;
    }
    .notif-icon { width: 36px; height: 36px; }
    .notif-actions {
      grid-column: 1 / -1;
      justify-content: flex-end;
      border-top: 1px dashed rgba(24, 24, 37, 0.08);
      padding-top: 6px;
      margin-top: 2px;
    }
  }
</style>
</head>
<body>

<div class="page">
  <section class="inbox-card" aria-label="Notification center">
    <header class="inbox-head">
      <div class="head-top">
        <div class="title-wrap">
          <div class="bell-badge" aria-hidden="true">
            <svg width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
          </div>
          <div>
            <h1>Relay Inbox</h1>
            <p id="inboxSubtitle">Priority notifications &middot; Smart snooze</p>
          </div>
        </div>
        <button class="mark-all-btn" id="markAllBtn" type="button">Mark all read</button>
      </div>

      <div class="tabs" role="tablist" id="filterTabs"></div>
    </header>

    <div class="groups" id="groupsContainer" aria-live="polite"></div>
  </section>
</div>

<div class="toast" id="toast" role="status" aria-live="polite">
  <span id="toastText">Notification archived</span>
  <button class="undo-btn" id="undoBtn" type="button">Undo</button>
</div>

<script>
let notifications = [
  {
    id: 'n1', group: 'Urgent', unread: true, snoozedUntil: null, archived: false,
    badge: 'PD', bg: '#FEE2E2', fg: '#B91C1C', source: 'PagerDuty', time: '4m ago',
    title: 'Checkout API p99 latency exceeded 1,200ms in us-east-1',
    desc: 'Auto-scaling added 4 pods, but Redis connection pool saturation remains at 94%. Assigned to @oncall-payments.'
  },
  {
    id: 'n2', group: 'Urgent', unread: true, snoozedUntil: null, archived: false,
    badge: 'SEC', bg: '#FEF3C7', fg: '#B45309', source: 'Security', time: '19m ago',
    title: 'Production webhook signing secret expires in 18 hours',
    desc: 'Rotate key `whsec_live_9f2a` in Stripe Dashboard and sync to Vault before 04:00 UTC.'
  },
  {
    id: 'n3', group: 'Today', unread: true, snoozedUntil: null, archived: false,
    badge: 'GH', bg: '#EDE9FE', fg: '#5B21B6', source: 'GitHub', time: '1h ago',
    title: 'Maya requested your review on PR #842: Retry idempotency keys',
    desc: '+214 / -38 across 6 files. All 142 unit and contract tests passing.'
  },
  {
    id: 'n4', group: 'Today', unread: false, snoozedUntil: null, archived: false,
    badge: 'FG', bg: '#E0F2FE', fg: '#0369A1', source: 'Figma', time: '3h ago',
    title: 'Sora mentioned you in "Billing Upgrade Drawer v3"',
    desc: '"Can we confirm whether the annual toggle persists when switching currency?"'
  },
  {
    id: 'n5', group: 'Today', unread: true, snoozedUntil: 'Tomorrow 9:00 AM', archived: false,
    badge: 'LN', bg: '#DCFCE7', fg: '#15803D', source: 'Linear', time: '4h ago',
    title: 'ENG-419 moved to Ready for QA: Export CSV with UTF-8 BOM',
    desc: 'Snoozed until morning QA sweep.'
  },
  {
    id: 'n6', group: 'Earlier', unread: false, snoozedUntil: null, archived: false,
    badge: 'ST', bg: '#F3E8FF', fg: '#7E22CE', source: 'Stripe', time: 'Yesterday',
    title: 'Enterprise invoice #INV-2094 ($18,400) paid by Northwind Labs',
    desc: 'Funds scheduled for automatic payout on Friday.'
  },
  {
    id: 'n7', group: 'Earlier', unread: false, snoozedUntil: null, archived: false,
    badge: 'VR', bg: '#E2E8F0', fg: '#334155', source: 'Vercel', time: '2d ago',
    title: 'Production deployment ready: marketing-site@4f92c1',
    desc: 'Lighthouse performance score: 99 desktop / 96 mobile.'
  }
];

let activeTab = 'all';
let openSnoozeId = null;
let lastAction = null;
let toastTimer = null;

const filterTabs = document.getElementById('filterTabs');
const groupsContainer = document.getElementById('groupsContainer');
const toast = document.getElementById('toast');
const toastText = document.getElementById('toastText');

function showToast(msg, undoFn) {
  lastAction = undoFn;
  toastText.textContent = msg;
  toast.classList.add('show');
  clearTimeout(toastTimer);
  toastTimer = setTimeout(() => {
    toast.classList.remove('show');
    lastAction = null;
  }, 4500);
}

document.getElementById('undoBtn').addEventListener('click', () => {
  if (lastAction) {
    lastAction();
    lastAction = null;
    toast.classList.remove('show');
    render();
  }
});

function getFiltered() {
  const active = notifications.filter(n => !n.archived);
  if (activeTab === 'unread') return active.filter(n => n.unread && !n.snoozedUntil);
  if (activeTab === 'snoozed') return active.filter(n => Boolean(n.snoozedUntil));
  return active.filter(n => !n.snoozedUntil);
}

function renderTabs() {
  const active = notifications.filter(n => !n.archived);
  const counts = {
    all: active.filter(n => !n.snoozedUntil).length,
    unread: active.filter(n => n.unread && !n.snoozedUntil).length,
    snoozed: active.filter(n => Boolean(n.snoozedUntil)).length
  };

  document.getElementById('inboxSubtitle').textContent =
    `${counts.unread} unread · ${counts.snoozed} snoozed`;

  const defs = [
    { key: 'all', label: 'All' },
    { key: 'unread', label: 'Unread' },
    { key: 'snoozed', label: 'Snoozed' }
  ];

  filterTabs.innerHTML = '';
  defs.forEach(d => {
    const b = document.createElement('button');
    b.type = 'button';
    b.className = 'tab' + (activeTab === d.key ? ' active' : '');
    b.innerHTML = `<span>${d.label}</span><span class="tab-count">${counts[d.key]}</span>`;
    b.addEventListener('click', () => {
      activeTab = d.key;
      openSnoozeId = null;
      render();
    });
    filterTabs.appendChild(b);
  });
}

function renderGroups() {
  const list = getFiltered();
  groupsContainer.innerHTML = '';

  if (list.length === 0) {
    groupsContainer.innerHTML = `
      <div class="empty">
        <h2>All caught up</h2>
        <p>${activeTab === 'snoozed' ? 'No snoozed notifications right now.' : 'Nothing waiting in this view.'}</p>
      </div>`;
    return;
  }

  const order = activeTab === 'snoozed' ? ['Snoozed'] : ['Urgent', 'Today', 'Earlier'];
  order.forEach(groupName => {
    const items = activeTab === 'snoozed'
      ? list
      : list.filter(n => n.group === groupName);
    if (items.length === 0) return;

    const head = document.createElement('div');
    head.className = 'group-label' + (groupName === 'Urgent' ? ' urgent' : '');
    head.innerHTML = `<span class="group-dot"></span><span>${groupName} (${items.length})</span>`;
    groupsContainer.appendChild(head);

    items.forEach(n => {
      const row = document.createElement('article');
      row.className = 'notif' + (n.unread ? ' unread' : '');
      row.innerHTML = `
        <div class="notif-icon" style="background:${n.bg};color:${n.fg}">${n.badge}</div>
        <div class="notif-content">
          <div class="notif-title">${n.title}</div>
          <div class="notif-desc">${n.desc}</div>
          <div class="notif-meta">
            <span class="pill-tag ${n.group === 'Urgent' ? 'pill-urgent' : ''}">${n.source}</span>
            ${n.snoozedUntil ? `<span class="pill-tag pill-snooze">Snoozed · ${n.snoozedUntil}</span>` : ''}
            <span>${n.time}</span>
          </div>
        </div>
        <div class="notif-actions">
          <button class="icon-btn ${openSnoozeId === n.id ? 'active' : ''}" data-act="snooze" type="button" title="${n.snoozedUntil ? 'Unsnooze' : 'Snooze'}" aria-label="${n.snoozedUntil ? 'Unsnooze notification' : 'Snooze notification'}">
            <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></svg>
          </button>
          <button class="icon-btn" data-act="read" type="button" title="${n.unread ? 'Mark read' : 'Mark unread'}" aria-label="${n.unread ? 'Mark read' : 'Mark unread'}">
            <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M20 6L9 17l-5-5"/></svg>
          </button>
          <button class="icon-btn" data-act="archive" type="button" title="Archive" aria-label="Archive notification">
            <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="4" width="18" height="4" rx="1"/><path d="M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/></svg>
          </button>
        </div>
      `;

      const actionsEl = row.querySelector('.notif-actions');

      if (openSnoozeId === n.id) {
        const menu = document.createElement('div');
        menu.className = 'snooze-menu';
        const opts = [
          { label: 'In 1 hour', sub: '+60m', val: 'In 1 hour' },
          { label: 'Tomorrow', sub: '9:00 AM', val: 'Tomorrow 9:00 AM' },
          { label: 'Next week', sub: 'Mon 9:00 AM', val: 'Next Mon 9:00 AM' }
        ];
        opts.forEach(o => {
          const ob = document.createElement('button');
          ob.type = 'button';
          ob.className = 'snooze-opt';
          ob.innerHTML = `<span>${o.label}</span><small>${o.sub}</small>`;
          ob.addEventListener('click', (e) => {
            e.stopPropagation();
            const prev = n.snoozedUntil;
            n.snoozedUntil = o.val;
            openSnoozeId = null;
            showToast(`Snoozed until ${o.val}`, () => { n.snoozedUntil = prev; });
            render();
          });
          menu.appendChild(ob);
        });
        actionsEl.appendChild(menu);
      }

      row.querySelector('[data-act="snooze"]').addEventListener('click', (e) => {
        e.stopPropagation();
        if (n.snoozedUntil) {
          const prev = n.snoozedUntil;
          n.snoozedUntil = null;
          showToast('Returned to inbox', () => { n.snoozedUntil = prev; });
          render();
        } else {
          openSnoozeId = openSnoozeId === n.id ? null : n.id;
          render();
        }
      });

      row.querySelector('[data-act="read"]').addEventListener('click', (e) => {
        e.stopPropagation();
        const prev = n.unread;
        n.unread = !n.unread;
        showToast(n.unread ? 'Marked as unread' : 'Marked as read', () => { n.unread = prev; });
        render();
      });

      row.querySelector('[data-act="archive"]').addEventListener('click', (e) => {
        e.stopPropagation();
        n.archived = true;
        openSnoozeId = null;
        showToast('Notification archived', () => { n.archived = false; });
        render();
      });

      groupsContainer.appendChild(row);
    });
  });
}

document.getElementById('markAllBtn').addEventListener('click', () => {
  const changed = notifications.filter(n => !n.archived && !n.snoozedUntil && n.unread);
  if (changed.length === 0) return;
  changed.forEach(n => { n.unread = false; });
  showToast(`Marked ${changed.length} as read`, () => {
    changed.forEach(n => { n.unread = true; });
  });
  render();
});

document.addEventListener('click', () => {
  if (openSnoozeId !== null) {
    openSnoozeId = null;
    render();
  }
});

function render() {
  renderTabs();
  renderGroups();
}

render();
</script>
</body>
</html>