SaaS — First-run / Empty States
A polished set of first-run and empty states for a fictional SaaS project area, covering no projects yet, no search results, no data connected, an error with retry, plus loading skeletons and a populated grid. A state switcher and cycle control preview each scene, while an inline create form, source connect, and retry flows transition into a freshly populated dashboard with realistic but clearly fictional data.
MCP
Code
:root {
--bg: #f7f8fb;
--surface: #ffffff;
--surface-2: #f1f3f9;
--ink: #0f1222;
--muted: #646b85;
--brand: #6366f1;
--brand-d: #4f46e5;
--brand-tint: #eef0fb;
--ok: #16a34a;
--warn: #d97706;
--danger: #dc2626;
--line: rgba(15, 18, 34, .1);
--line-2: rgba(15, 18, 34, .06);
--shadow-sm: 0 1px 2px rgba(15, 18, 34, .06);
--shadow: 0 8px 28px rgba(15, 18, 34, .1);
--radius: 14px;
--sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
margin: 0;
font-family: var(--sans);
background: var(--bg);
color: var(--ink);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
button { font-family: inherit; }
:focus-visible {
outline: 2.5px solid var(--brand);
outline-offset: 2px;
border-radius: 6px;
}
/* ---------- Layout ---------- */
.app {
display: grid;
grid-template-columns: 256px 1fr;
min-height: 100vh;
}
.sidebar {
background: var(--surface);
border-right: 1px solid var(--line);
padding: 20px 16px;
display: flex;
flex-direction: column;
gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.brand__mark {
display: grid;
place-items: center;
width: 34px; height: 34px;
border-radius: 9px;
background: linear-gradient(135deg, var(--brand), var(--brand-d));
color: #fff;
}
.brand__name { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
display: flex; align-items: center; gap: 11px;
padding: 9px 10px;
border-radius: 9px;
color: var(--muted);
text-decoration: none;
font-size: .9rem;
font-weight: 500;
transition: background .15s, color .15s;
}
.nav__item:hover { background: var(--surface-2); color: var(--ink); }
.nav__item.is-active { background: var(--brand-tint); color: var(--brand-d); }
.plan-card {
margin-top: auto;
border: 1px solid var(--line);
border-radius: 12px;
padding: 14px;
background: linear-gradient(180deg, #fff, var(--surface-2));
}
.plan-card__label { margin: 0; font-weight: 600; font-size: .85rem; }
.plan-card__meta { margin: 2px 0 8px; font-size: .78rem; color: var(--muted); }
.plan-card__bar {
height: 6px; border-radius: 99px;
background: var(--line); overflow: hidden; margin-bottom: 11px;
}
.plan-card__bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 6px; }
/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
display: flex; align-items: center; justify-content: space-between;
gap: 16px; flex-wrap: wrap;
padding: 16px 28px;
border-bottom: 1px solid var(--line);
background: rgba(255, 255, 255, .8);
backdrop-filter: blur(8px);
position: sticky; top: 0; z-index: 5;
}
.topbar__title { margin: 0; font-size: 1.3rem; letter-spacing: -.02em; }
.topbar__crumb { font-size: .78rem; color: var(--muted); }
.topbar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.state-switch {
display: flex; align-items: center; gap: 5px;
background: var(--surface-2);
border: 1px solid var(--line-2);
border-radius: 11px;
padding: 4px;
}
.state-switch__label {
font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
color: var(--muted); font-weight: 600; padding: 0 6px 0 4px;
}
.chip {
border: 0; background: transparent; cursor: pointer;
padding: 6px 11px; border-radius: 8px;
font-size: .82rem; font-weight: 500; color: var(--muted);
transition: background .15s, color .15s, box-shadow .15s;
}
.chip:hover { color: var(--ink); }
.chip.is-active { background: var(--surface); color: var(--brand-d); box-shadow: var(--shadow-sm); }
/* ---------- Buttons ---------- */
.btn {
display: inline-flex; align-items: center; gap: 8px;
border: 1px solid transparent; cursor: pointer;
padding: 10px 16px; border-radius: 10px;
font-size: .9rem; font-weight: 600;
transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn--brand { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn--brand:hover { background: var(--brand-d); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { padding: 7px 12px; font-size: .83rem; }
.btn--icon {
padding: 9px; border-radius: 10px;
background: var(--surface); color: var(--muted); border-color: var(--line);
}
.btn--icon:hover { background: var(--surface-2); color: var(--ink); }
/* ---------- Stage / empty states ---------- */
.stage {
flex: 1; display: grid; place-items: center;
padding: 40px 28px;
}
.empty {
max-width: 480px; text-align: center;
display: flex; flex-direction: column; align-items: center;
animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.empty__art {
margin-bottom: 18px;
filter: drop-shadow(0 12px 22px rgba(99, 102, 241, .14));
}
.empty--error .empty__art { filter: drop-shadow(0 12px 22px rgba(220, 38, 38, .12)); }
.empty__title { margin: 0 0 8px; font-size: 1.4rem; letter-spacing: -.02em; }
.empty__text { margin: 0 0 22px; color: var(--muted); font-size: .95rem; max-width: 40ch; }
.empty__text--center { margin-top: 26px; }
.empty__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.empty__code {
margin-top: 18px; font-size: .76rem; color: var(--muted);
font-family: ui-monospace, "SF Mono", Menlo, monospace;
background: var(--surface-2); padding: 5px 10px; border-radius: 7px;
}
/* ---------- Inline create form ---------- */
.create-form {
margin-top: 26px; width: min(440px, 100%);
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: var(--shadow);
padding: 18px;
text-align: left;
animation: rise .25s ease both;
}
.create-form__row { display: grid; grid-template-columns: 1fr auto; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: .78rem; font-weight: 600; color: var(--muted); }
.field__input {
border: 1px solid var(--line); border-radius: 9px;
padding: 10px 12px; font-size: .92rem; color: var(--ink);
background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.field__input:focus {
outline: none; border-color: var(--brand);
box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}
.swatches { display: flex; gap: 7px; padding-top: 2px; }
.swatch {
width: 26px; height: 26px; border-radius: 50%;
border: 2px solid transparent; cursor: pointer;
background: var(--c); box-shadow: 0 0 0 0 var(--c);
transition: box-shadow .15s, transform .1s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
.create-form__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
/* ---------- Loading skeleton ---------- */
.empty--loading { max-width: 760px; width: 100%; }
.skel-grid {
display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%;
}
.skel-card {
height: 132px; border-radius: var(--radius);
border: 1px solid var(--line-2);
background: linear-gradient(100deg, var(--surface-2) 30%, #fff 50%, var(--surface-2) 70%);
background-size: 220% 100%;
animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 220% 0; } to { background-position: -220% 0; } }
/* ---------- Populated ---------- */
.populated { width: 100%; max-width: 880px; animation: rise .35s ease both; }
.pop-toolbar {
display: flex; align-items: center; justify-content: space-between;
margin-bottom: 16px;
}
.pop-toolbar__count { margin: 0; color: var(--muted); font-size: .9rem; }
.pop-toolbar__count strong { color: var(--ink); }
.grid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.proj {
text-align: left; border: 1px solid var(--line); border-radius: var(--radius);
background: var(--surface); padding: 16px; box-shadow: var(--shadow-sm);
display: flex; flex-direction: column; gap: 12px;
transition: transform .12s, box-shadow .15s, border-color .15s;
animation: rise .3s ease both;
}
.proj:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand); }
.proj__top { display: flex; align-items: center; gap: 10px; }
.proj__dot { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .9rem; }
.proj__name { font-weight: 600; font-size: .98rem; }
.proj__meta { font-size: .76rem; color: var(--muted); }
.proj__bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.proj__bar i { display: block; height: 100%; border-radius: 99px; }
.proj__foot { display: flex; align-items: center; justify-content: space-between; font-size: .78rem; color: var(--muted); }
.proj__avatars { display: flex; }
.proj__avatars span {
width: 22px; height: 22px; border-radius: 50%; margin-left: -7px;
border: 2px solid var(--surface); display: grid; place-items: center;
font-size: .62rem; font-weight: 700; color: #fff;
}
.proj__avatars span:first-child { margin-left: 0; }
/* ---------- Toast ---------- */
.toast {
position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 24px);
background: var(--ink); color: #fff;
padding: 11px 18px; border-radius: 11px;
font-size: .88rem; font-weight: 500;
box-shadow: var(--shadow); opacity: 0; pointer-events: none;
transition: opacity .25s, transform .25s; z-index: 50; max-width: 90vw;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
/* ---------- Responsive ---------- */
@media (max-width: 860px) {
.app { grid-template-columns: 1fr; }
.sidebar {
flex-direction: row; align-items: center; gap: 14px;
padding: 12px 16px; overflow-x: auto;
}
.nav { flex-direction: row; }
.plan-card { display: none; }
.skel-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
.topbar { padding: 14px 16px; }
.stage { padding: 28px 16px; }
.state-switch { width: 100%; overflow-x: auto; }
.create-form__row { grid-template-columns: 1fr; }
.skel-grid { grid-template-columns: 1fr; }
.empty__actions { width: 100%; }
.empty__actions .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}(function () {
"use strict";
var STATES = ["no-projects", "no-results", "no-data", "error", "populated"];
var panels = {};
document.querySelectorAll("[data-panel]").forEach(function (el) {
panels[el.getAttribute("data-panel")] = el;
});
var chips = Array.prototype.slice.call(document.querySelectorAll(".chip"));
var stage = document.getElementById("stage");
/* ---------- Toast ---------- */
var toastEl = document.getElementById("toast");
var toastTimer;
function toast(msg) {
if (!toastEl) return;
toastEl.textContent = msg;
toastEl.classList.add("is-show");
clearTimeout(toastTimer);
toastTimer = setTimeout(function () {
toastEl.classList.remove("is-show");
}, 2400);
}
document.querySelectorAll("[data-toast]").forEach(function (b) {
b.addEventListener("click", function () { toast(b.getAttribute("data-toast")); });
});
/* ---------- Show a panel ---------- */
function show(name) {
Object.keys(panels).forEach(function (k) {
panels[k].hidden = k !== name;
});
// sync chips only for the canonical states
chips.forEach(function (c) {
c.classList.toggle("is-active", c.getAttribute("data-state") === name);
});
// reset transient form on leaving no-projects
if (name !== "no-projects") closeForm();
}
chips.forEach(function (chip) {
chip.addEventListener("click", function () {
show(chip.getAttribute("data-state"));
});
});
/* ---------- Cycle button ---------- */
document.getElementById("cycleBtn").addEventListener("click", function () {
var active = chips.find(function (c) { return c.classList.contains("is-active"); });
var idx = active ? STATES.indexOf(active.getAttribute("data-state")) : -1;
show(STATES[(idx + 1) % STATES.length]);
});
/* ---------- Inline create form ---------- */
var createBtn = document.getElementById("createBtn");
var createForm = document.getElementById("createForm");
var nameInput = document.getElementById("projName");
var chosenColor = "#6366f1";
function openForm() {
createForm.hidden = false;
createBtn.setAttribute("aria-expanded", "true");
nameInput.value = "";
nameInput.focus();
}
function closeForm() {
if (createForm) createForm.hidden = true;
if (createBtn) createBtn.setAttribute("aria-expanded", "false");
}
createBtn.addEventListener("click", openForm);
document.getElementById("cancelCreate").addEventListener("click", closeForm);
// color swatches
document.querySelectorAll(".swatch").forEach(function (sw) {
sw.addEventListener("click", function () {
document.querySelectorAll(".swatch").forEach(function (s) {
s.classList.remove("is-active");
s.setAttribute("aria-checked", "false");
});
sw.classList.add("is-active");
sw.setAttribute("aria-checked", "true");
chosenColor = sw.getAttribute("data-color");
});
});
/* ---------- Project store + rendering ---------- */
function initial(name) {
var p = name.trim().split(/\s+/);
return ((p[0][0] || "") + (p[1] ? p[1][0] : "")).toUpperCase();
}
var projects = [
{ name: "Q3 Launch", color: "#6366f1", tasks: "18 tasks", progress: 64, updated: "2h ago", team: ["AM", "TR", "JK"] },
{ name: "Brand Refresh", color: "#16a34a", tasks: "9 tasks", progress: 38, updated: "yesterday", team: ["LN", "PS"] },
{ name: "Mobile Beta", color: "#d97706", tasks: "27 tasks", progress: 82, updated: "3d ago", team: ["RK", "DV", "MC"] }
];
var grid = document.getElementById("projGrid");
var countEl = document.getElementById("projCount");
function renderProjects() {
grid.innerHTML = "";
projects.forEach(function (p, i) {
var card = document.createElement("article");
card.className = "proj";
card.style.animationDelay = (i * 0.05) + "s";
var avatars = p.team.map(function (t, j) {
var hues = ["#6366f1", "#0ea5e9", "#16a34a", "#d97706"];
return '<span style="background:' + hues[j % hues.length] + '">' + t + "</span>";
}).join("");
card.innerHTML =
'<div class="proj__top">' +
'<span class="proj__dot" style="background:' + p.color + '">' + initial(p.name) + "</span>" +
'<div><div class="proj__name">' + escapeHtml(p.name) + "</div>" +
'<div class="proj__meta">' + p.tasks + " · updated " + p.updated + "</div></div>" +
"</div>" +
'<div class="proj__bar"><i style="width:' + p.progress + "%;background:" + p.color + '"></i></div>' +
'<div class="proj__foot">' +
'<div class="proj__avatars">' + avatars + "</div>" +
"<span>" + p.progress + "% done</span>" +
"</div>";
grid.appendChild(card);
});
countEl.textContent = String(projects.length);
}
function escapeHtml(s) {
return s.replace(/[&<>"']/g, function (c) {
return { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }[c];
});
}
createForm.addEventListener("submit", function (e) {
e.preventDefault();
var name = nameInput.value.trim();
if (!name) { nameInput.focus(); return; }
projects.unshift({
name: name, color: chosenColor, tasks: "0 tasks",
progress: 0, updated: "just now", team: ["YOU"]
});
renderProjects();
closeForm();
show("populated");
toast("Project “" + name + "” created.");
});
/* ---------- No results: clear search ---------- */
document.getElementById("clearSearch").addEventListener("click", function () {
show("populated");
toast("Search cleared.");
});
/* ---------- No data: connect ---------- */
document.getElementById("connectBtn").addEventListener("click", function () {
show("loading");
setTimeout(function () {
renderProjects();
show("populated");
toast("Source connected — data synced.");
}, 1300);
});
/* ---------- Error: retry → loading → populated ---------- */
document.getElementById("retryBtn").addEventListener("click", function () {
show("loading");
setTimeout(function () {
renderProjects();
show("populated");
toast("Loaded successfully.");
}, 1300);
});
/* ---------- Init ---------- */
renderProjects();
show("no-projects");
})();<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Atlas — First-run / Empty States</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=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="app">
<!-- Sidebar -->
<aside class="sidebar" aria-label="Primary">
<div class="brand">
<span class="brand__mark" aria-hidden="true">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none"><path d="M12 2 2 7l10 5 10-5-10-5Z" fill="currentColor"/><path d="M2 17l10 5 10-5M2 12l10 5 10-5" stroke="currentColor" stroke-width="1.6" fill="none" stroke-linejoin="round"/></svg>
</span>
<span class="brand__name">Atlas</span>
</div>
<nav class="nav" aria-label="Sections">
<a href="#" class="nav__item is-active" aria-current="page">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true"><rect x="3" y="3" width="7" height="7" rx="1.5" fill="currentColor"/><rect x="14" y="3" width="7" height="7" rx="1.5" stroke="currentColor" stroke-width="1.6"/><rect x="3" y="14" width="7" height="7" rx="1.5" stroke="currentColor" stroke-width="1.6"/><rect x="14" y="14" width="7" height="7" rx="1.5" stroke="currentColor" stroke-width="1.6"/></svg>
Projects
</a>
<a href="#" class="nav__item">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M4 19V5m4 14v-8m4 8V8m4 11V11m4 8V6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
Insights
</a>
<a href="#" class="nav__item">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true"><circle cx="12" cy="8" r="3.2" stroke="currentColor" stroke-width="1.6"/><path d="M5 20c0-3.3 3.1-6 7-6s7 2.7 7 6" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/></svg>
Team
</a>
<a href="#" class="nav__item">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke="currentColor" stroke-width="1.6"/><path d="M19 12a7 7 0 0 0-.1-1l2-1.5-2-3.5-2.4 1a7 7 0 0 0-1.7-1L16.5 3h-4l-.3 2.5a7 7 0 0 0-1.7 1l-2.4-1-2 3.5L6 11a7 7 0 0 0 0 2l-2 1.5 2 3.5 2.4-1a7 7 0 0 0 1.7 1l.3 2.5h4l.3-2.5a7 7 0 0 0 1.7-1l2.4 1 2-3.5-2-1.5c.1-.3.1-.7.1-1Z" stroke="currentColor" stroke-width="1.2" stroke-linejoin="round"/></svg>
Settings
</a>
</nav>
<div class="plan-card">
<p class="plan-card__label">Starter plan</p>
<p class="plan-card__meta">0 of 3 projects used</p>
<div class="plan-card__bar"><i style="width:4%"></i></div>
<button class="btn btn--ghost btn--sm" type="button" data-toast="Upgrade flow is illustrative only.">Upgrade</button>
</div>
</aside>
<!-- Main -->
<div class="main">
<header class="topbar">
<div class="topbar__left">
<h1 class="topbar__title">Projects</h1>
<span class="topbar__crumb">Workspace · Northwind</span>
</div>
<div class="topbar__right">
<div class="state-switch" role="group" aria-label="Preview empty state">
<span class="state-switch__label">State</span>
<button class="chip is-active" type="button" data-state="no-projects">No projects</button>
<button class="chip" type="button" data-state="no-results">No results</button>
<button class="chip" type="button" data-state="no-data">No data</button>
<button class="chip" type="button" data-state="error">Error</button>
<button class="chip" type="button" data-state="populated">Populated</button>
</div>
<button class="btn btn--icon" type="button" id="cycleBtn" aria-label="Cycle through states" title="Cycle states">
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M4 4v6h6M20 20v-6h-6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 10a8 8 0 0 0-14.3-3.7M4 14a8 8 0 0 0 14.3 3.7" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
</button>
</div>
</header>
<main class="stage" id="stage" aria-live="polite">
<!-- No projects -->
<section class="empty" data-panel="no-projects">
<div class="empty__art" aria-hidden="true">
<svg viewBox="0 0 220 150" width="220" height="150" role="img">
<defs>
<linearGradient id="gA" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#a5b4fc"/><stop offset="1" stop-color="#6366f1"/></linearGradient>
</defs>
<ellipse cx="110" cy="132" rx="78" ry="10" fill="rgba(99,102,241,.12)"/>
<rect x="44" y="40" width="132" height="78" rx="10" fill="#fff" stroke="rgba(15,18,34,.12)"/>
<rect x="44" y="40" width="132" height="22" rx="10" fill="url(#gA)"/>
<rect x="44" y="52" width="132" height="10" fill="url(#gA)"/>
<circle cx="56" cy="51" r="2.4" fill="#fff"/><circle cx="64" cy="51" r="2.4" fill="#fff"/><circle cx="72" cy="51" r="2.4" fill="#fff"/>
<rect x="58" y="74" width="46" height="8" rx="4" fill="rgba(15,18,34,.1)"/>
<rect x="58" y="90" width="104" height="6" rx="3" fill="rgba(15,18,34,.07)"/>
<rect x="58" y="102" width="78" height="6" rx="3" fill="rgba(15,18,34,.07)"/>
<g transform="translate(140 84)">
<circle cx="18" cy="18" r="20" fill="#6366f1"/>
<path d="M18 9v18M9 18h18" stroke="#fff" stroke-width="3" stroke-linecap="round"/>
</g>
</svg>
</div>
<h2 class="empty__title">Create your first project</h2>
<p class="empty__text">Projects keep your boards, docs and automations together. Spin one up in seconds, or bring work over from a tool you already use.</p>
<div class="empty__actions">
<button class="btn btn--brand" type="button" id="createBtn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M12 5v14M5 12h14" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
Create project
</button>
<button class="btn btn--ghost" type="button" data-toast="Import wizard is illustrative only.">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M12 3v12m0 0 4-4m-4 4-4-4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
Import from Trello
</button>
</div>
<!-- inline create form -->
<form class="create-form" id="createForm" hidden>
<div class="create-form__row">
<label class="field">
<span class="field__label">Project name</span>
<input class="field__input" id="projName" type="text" placeholder="e.g. Q3 Launch" autocomplete="off" required />
</label>
<label class="field field--swatch">
<span class="field__label">Color</span>
<div class="swatches" id="swatches" role="radiogroup" aria-label="Project color">
<button type="button" class="swatch is-active" style="--c:#6366f1" data-color="#6366f1" role="radio" aria-checked="true" aria-label="Indigo"></button>
<button type="button" class="swatch" style="--c:#16a34a" data-color="#16a34a" role="radio" aria-checked="false" aria-label="Green"></button>
<button type="button" class="swatch" style="--c:#d97706" data-color="#d97706" role="radio" aria-checked="false" aria-label="Amber"></button>
<button type="button" class="swatch" style="--c:#dc2626" data-color="#dc2626" role="radio" aria-checked="false" aria-label="Red"></button>
<button type="button" class="swatch" style="--c:#0ea5e9" data-color="#0ea5e9" role="radio" aria-checked="false" aria-label="Sky"></button>
</div>
</label>
</div>
<div class="create-form__foot">
<button class="btn btn--ghost" type="button" id="cancelCreate">Cancel</button>
<button class="btn btn--brand" type="submit">Create project</button>
</div>
</form>
</section>
<!-- No results -->
<section class="empty" data-panel="no-results" hidden>
<div class="empty__art" aria-hidden="true">
<svg viewBox="0 0 220 150" width="220" height="150">
<ellipse cx="110" cy="132" rx="70" ry="9" fill="rgba(99,102,241,.1)"/>
<circle cx="98" cy="66" r="34" fill="#fff" stroke="rgba(15,18,34,.14)" stroke-width="3"/>
<path d="M123 91l22 22" stroke="rgba(15,18,34,.3)" stroke-width="7" stroke-linecap="round"/>
<path d="M84 66h28M84 56h28M84 76h18" stroke="rgba(99,102,241,.35)" stroke-width="4" stroke-linecap="round"/>
<circle cx="98" cy="66" r="34" fill="none" stroke="rgba(99,102,241,.25)" stroke-width="2" stroke-dasharray="4 6"/>
</svg>
</div>
<h2 class="empty__title">No matches for “<span id="queryEcho">helios</span>”</h2>
<p class="empty__text">We couldn’t find any projects with that name. Check the spelling or try a broader term.</p>
<div class="empty__actions">
<button class="btn btn--brand" type="button" id="clearSearch">Clear search</button>
</div>
</section>
<!-- No data / connect source -->
<section class="empty" data-panel="no-data" hidden>
<div class="empty__art" aria-hidden="true">
<svg viewBox="0 0 220 150" width="220" height="150">
<ellipse cx="110" cy="132" rx="74" ry="9" fill="rgba(99,102,241,.1)"/>
<rect x="34" y="58" width="44" height="44" rx="10" fill="#fff" stroke="rgba(15,18,34,.14)"/>
<path d="M48 80h16M56 72v16" stroke="#6366f1" stroke-width="3" stroke-linecap="round"/>
<rect x="142" y="58" width="44" height="44" rx="10" fill="#eef0fb" stroke="rgba(99,102,241,.4)"/>
<path d="M156 70h16v8h-16zM156 82h16" stroke="#6366f1" stroke-width="2.4" stroke-linecap="round"/>
<path d="M82 80h56" stroke="rgba(99,102,241,.45)" stroke-width="3" stroke-dasharray="2 7" stroke-linecap="round"/>
<circle cx="110" cy="80" r="9" fill="#6366f1"/><path d="M106 80l3 3 5-6" stroke="#fff" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
</svg>
</div>
<h2 class="empty__title">No data yet</h2>
<p class="empty__text">Connect a data source to start syncing activity. Your dashboards will populate automatically once the first events arrive.</p>
<div class="empty__actions">
<button class="btn btn--brand" type="button" id="connectBtn" data-toast="Connecting source… (illustrative).">Connect a source</button>
<button class="btn btn--ghost" type="button" data-toast="Docs are illustrative only.">Read the guide</button>
</div>
</section>
<!-- Error / retry -->
<section class="empty empty--error" data-panel="error" hidden>
<div class="empty__art" aria-hidden="true">
<svg viewBox="0 0 220 150" width="220" height="150">
<ellipse cx="110" cy="132" rx="70" ry="9" fill="rgba(220,38,38,.1)"/>
<path d="M110 36l46 80H64l46-80Z" fill="#fff" stroke="rgba(220,38,38,.5)" stroke-width="3" stroke-linejoin="round"/>
<path d="M110 66v24" stroke="#dc2626" stroke-width="6" stroke-linecap="round"/>
<circle cx="110" cy="104" r="4.4" fill="#dc2626"/>
</svg>
</div>
<h2 class="empty__title">Something went wrong</h2>
<p class="empty__text">We couldn’t load your projects. This is usually temporary — give it another try in a moment.</p>
<div class="empty__actions">
<button class="btn btn--brand" type="button" id="retryBtn">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" aria-hidden="true"><path d="M4 4v6h6" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 12a8 8 0 1 0-2.3 5.7" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/></svg>
Try again
</button>
<button class="btn btn--ghost" type="button" data-toast="Status page is illustrative only.">View status</button>
</div>
<p class="empty__code">Error ATL-503 · request id 7f3a9c</p>
</section>
<!-- Loading -->
<section class="empty empty--loading" data-panel="loading" hidden>
<div class="skel-grid">
<div class="skel-card"></div><div class="skel-card"></div><div class="skel-card"></div>
</div>
<p class="empty__text empty__text--center">Loading your projects…</p>
</section>
<!-- Populated -->
<section class="populated" data-panel="populated" hidden>
<div class="pop-toolbar">
<p class="pop-toolbar__count"><strong id="projCount">3</strong> projects</p>
<button class="btn btn--brand btn--sm" type="button" data-toast="New project flow is illustrative only.">New project</button>
</div>
<div class="grid" id="projGrid"></div>
</section>
</main>
</div>
</div>
<div class="toast" id="toast" role="status" aria-live="polite"></div>
<script src="script.js"></script>
</body>
</html>First-run / Empty States
A compact SaaS shell — sidebar, sticky topbar, and a centered stage — that showcases every empty and first-run state a product area needs. Each scene ships with an intentional inline-SVG illustration (never a blank gray box): a stacked window for “no projects”, a magnifier for “no results”, linked source nodes for “no data”, and a warning marker for the error state. A loading scene uses shimmering skeleton cards.
The topbar holds a state switcher plus a cycle button so you can walk through No projects, No results, No data, Error, and Populated. The interactions actually resolve: the “Create project” CTA opens a tiny inline form with a name field and color swatches that, on submit, prepends a real card and flips to the populated grid. “Connect a source” and “Try again” both route through the loading skeleton before revealing data, and “Clear search” returns you to the populated list. A small toast confirms each action.
Everything is keyboard-usable with visible focus rings, landmark roles, and AA-contrast text, and the layout collapses gracefully to a horizontal nav and single-column stage on narrow screens.
Illustrative SaaS UI only — fictional product, metrics, and billing. No real backend.