# mockup-snippets

Ready-to-paste UI patterns for the `mockup` field in plan-json. The mockup-preset stylesheet (see `vendor/mockup-preset.css`) already styles all of these without extra CSS — just drop a snippet into `steps[].mockup.html` and edit the text.

Pick the right **frame** for the canvas:

- `window` — desktop app UI (macOS chrome with traffic lights + title)
- `browser` — web page (URL bar uses `title`)
- `phone` — mobile (phone bezel)
- `none` — chrome-less component fragment

All snippets work in both light and dark mode automatically — the preset has matching dark tokens via `prefers-color-scheme`.

---

## 1. Login form

```html
<main><section style="max-width:380px;margin:auto">
  <h1>Welcome back</h1>
  <p class="muted">Sign in to continue to Acme.</p>
  <label>Email<input type="email" placeholder="you@example.com" autofocus></label>
  <label style="margin-top:10px">Password<input type="password" placeholder="••••••••"></label>
  <div class="row" style="margin-top:14px"><label style="margin:0;padding:0;border:none;background:transparent"><input type="checkbox"> Remember me</label><span class="spacer"></span><a href="#" class="muted">Forgot?</a></div>
  <button data-variant="primary" style="width:100%;margin-top:18px">Sign in</button>
  <div class="muted center" style="margin-top:12px">or sign in with <a href="#">Google</a> · <a href="#">GitHub</a></div>
</section></main>
```

---

## 2. Sign up

```html
<main><section style="max-width:380px;margin:auto">
  <h1>Create your account</h1>
  <p class="muted">No credit card required. Free for 14 days.</p>
  <label>Work email<input type="email" placeholder="you@company.com"></label>
  <label style="margin-top:10px">Full name<input type="text" placeholder="Jane Smith"></label>
  <label style="margin-top:10px">Workspace<input type="text" placeholder="acme-inc"></label>
  <button data-variant="primary" style="width:100%;margin-top:18px">Create account</button>
  <p class="muted center" style="margin-top:12px">Already have one? <a href="#">Sign in</a></p>
</section></main>
```

---

## 3. Empty state with CTA

```html
<main>
  <div class="empty">
    <div style="font-size:32px;margin-bottom:6px">📝</div>
    <h3>No notes yet</h3>
    <p class="muted">Capture your first thought to get started. Notes sync across all your devices.</p>
    <div style="margin-top:14px"><button data-variant="primary">+ New note</button></div>
  </div>
</main>
```

---

## 4. Settings list with toggles

```html
<main><section>
  <h2>Notifications</h2>
  <p class="muted">Choose what you want to be alerted about.</p>
  <div class="col">
    <div class="card row">
      <div class="col tight"><strong>Daily digest</strong><span class="muted">Email summary every morning at 8am</span></div>
      <span class="spacer"></span><div class="switch on"></div>
    </div>
    <div class="card row">
      <div class="col tight"><strong>Realtime alerts</strong><span class="muted">Push notifications for mentions and replies</span></div>
      <span class="spacer"></span><div class="switch"></div>
    </div>
    <div class="card row">
      <div class="col tight"><strong>Weekly report</strong><span class="muted">Productivity summary every Monday</span></div>
      <span class="spacer"></span><div class="switch on"></div>
    </div>
  </div>
</section></main>
```

---

## 5. Data table with row actions

```html
<main><section>
  <div class="row"><h2 style="margin:0">Customers</h2><span class="pill primary">3 new</span><span class="spacer"></span><input type="search" placeholder="Search…" style="width:220px"><button data-variant="primary">+ Add</button></div>
  <table>
    <thead><tr><th>Name</th><th>Email</th><th>Status</th><th>Plan</th><th></th></tr></thead>
    <tbody>
      <tr><td><div class="row" style="gap:8px"><div class="avatar sm">AS</div>Ava Singh</div></td><td class="muted">ava@stripe.com</td><td><span class="pill success dot">active</span></td><td>Pro</td><td class="right"><button data-variant="ghost">⋯</button></td></tr>
      <tr><td><div class="row" style="gap:8px"><div class="avatar sm" style="background:linear-gradient(135deg,#fb923c,#dc2626)">BK</div>Ben Kohli</div></td><td class="muted">ben@acme.io</td><td><span class="pill warn dot">trialing</span></td><td>Free</td><td class="right"><button data-variant="ghost">⋯</button></td></tr>
      <tr><td><div class="row" style="gap:8px"><div class="avatar sm" style="background:linear-gradient(135deg,#34d399,#16a34a)">CR</div>Carla Reyes</div></td><td class="muted">carla@nova.dev</td><td><span class="pill dot">paused</span></td><td>Team</td><td class="right"><button data-variant="ghost">⋯</button></td></tr>
    </tbody>
  </table>
</section></main>
```

---

## 6. Pricing tiers

```html
<main><section>
  <h2 class="center">Choose a plan</h2>
  <p class="muted center">Cancel anytime. All plans include unlimited workspaces.</p>
  <div class="row" style="gap:14px;align-items:stretch;margin-top:18px">
    <div class="card" style="flex:1">
      <h3>Free</h3><p class="muted">For trying things out</p>
      <div style="font-size:28px;font-weight:600;margin:8px 0">$0<span class="muted" style="font-size:14px;font-weight:400">/mo</span></div>
      <ul style="padding-left:18px;margin:10px 0"><li>1 workspace</li><li>Up to 10 notes</li><li>Community support</li></ul>
      <button style="width:100%">Start free</button>
    </div>
    <div class="card" style="flex:1;border-color:#4f46e5;box-shadow:0 0 0 1px #4f46e5">
      <div class="row"><h3 style="margin:0">Pro</h3><span class="spacer"></span><span class="pill primary">Most popular</span></div>
      <p class="muted">For active teams</p>
      <div style="font-size:28px;font-weight:600;margin:8px 0">$12<span class="muted" style="font-size:14px;font-weight:400">/user/mo</span></div>
      <ul style="padding-left:18px;margin:10px 0"><li>Unlimited workspaces</li><li>Unlimited notes</li><li>Priority email support</li></ul>
      <button data-variant="primary" style="width:100%">Start trial</button>
    </div>
    <div class="card" style="flex:1">
      <h3>Enterprise</h3><p class="muted">For larger orgs</p>
      <div style="font-size:28px;font-weight:600;margin:8px 0">Custom</div>
      <ul style="padding-left:18px;margin:10px 0"><li>SSO + SCIM</li><li>Audit logs</li><li>Dedicated CSM</li></ul>
      <button style="width:100%">Contact sales</button>
    </div>
  </div>
</section></main>
```

---

## 7. Modal / confirmation dialog

```html
<main>
  <div style="max-width:420px;margin:auto;background:var(--m-bg);border:1px solid var(--m-border);border-radius:12px;box-shadow:var(--m-shadow-lg);padding:20px 22px">
    <h2>Delete this workspace?</h2>
    <p class="muted">This will permanently delete <strong>Personal</strong> and all 12 notes inside it. This action cannot be undone.</p>
    <label style="margin-top:14px;background:#fef2f2;border-color:#fecaca"><input type="checkbox"> I understand this is permanent</label>
    <div class="row" style="margin-top:14px"><span class="spacer"></span><button>Cancel</button><button data-variant="danger">Delete workspace</button></div>
  </div>
</main>
```

---

## 8. Banner / inline alert

```html
<main>
  <div class="card row" style="background:#fef3c7;border-color:#facc15;border-left:3px solid #d97706;padding:10px 14px">
    <span style="font-size:18px">⚠</span>
    <div class="col tight"><strong>Your trial ends in 3 days</strong><span class="muted">Add a payment method to keep your workspace active.</span></div>
    <span class="spacer"></span>
    <button data-variant="primary">Add payment</button>
  </div>
</main>
```

---

## 9. Avatar stack

```html
<div class="row" style="gap:0">
  <div class="avatar sm" style="margin-right:-6px;z-index:4">AS</div>
  <div class="avatar sm" style="margin-right:-6px;z-index:3;background:linear-gradient(135deg,#fb923c,#dc2626)">BK</div>
  <div class="avatar sm" style="margin-right:-6px;z-index:2;background:linear-gradient(135deg,#34d399,#16a34a)">CR</div>
  <div class="avatar sm" style="background:var(--m-surface-alt);color:var(--m-fg-muted)">+5</div>
  <span class="muted" style="margin-left:8px">on this workspace</span>
</div>
```

---

## 10. Multi-step wizard / stepper

```html
<main><section>
  <div class="row" style="gap:0">
    <div class="row" style="gap:6px"><div class="avatar sm" style="background:#16a34a">✓</div><span>Plan</span></div>
    <div style="flex:1;height:1px;background:var(--m-border);margin:0 12px"></div>
    <div class="row" style="gap:6px"><div class="avatar sm" style="background:#4f46e5">2</div><strong>Review</strong></div>
    <div style="flex:1;height:1px;background:var(--m-border);margin:0 12px"></div>
    <div class="row" style="gap:6px"><div class="avatar sm" style="background:var(--m-surface-alt);color:var(--m-fg-muted)">3</div><span class="muted">Execute</span></div>
  </div>
  <div style="margin-top:20px"><h2>Review your plan</h2><p class="muted">8 steps · 3 risks · 2 open questions</p></div>
</section></main>
```

---

## 11. File upload drop zone

```html
<main><section>
  <h2>Upload meeting recordings</h2>
  <div class="empty" style="padding:48px 16px;border-style:dashed">
    <div style="font-size:28px;margin-bottom:8px">⬆</div>
    <strong>Drop audio files here</strong>
    <p class="muted" style="margin-top:4px">or <a href="#">browse from your computer</a></p>
    <p class="muted" style="font-size:12px;margin-top:8px">MP3 · WAV · M4A · up to 500 MB each</p>
  </div>
</section></main>
```

---

## 12. Notification list

```html
<main><section>
  <h2>Notifications</h2>
  <div class="col">
    <div class="card row" style="background:var(--m-accent-soft);border-color:transparent"><div class="avatar sm">BK</div><div class="col tight"><strong>Ben Kohli</strong> commented on <strong>Auth refactor</strong><span class="muted">"Should we keep the old endpoint around for a month?"</span><span class="muted" style="font-size:12px">2 min ago</span></div></div>
    <div class="card row"><div class="avatar sm" style="background:linear-gradient(135deg,#34d399,#16a34a)">SY</div><div class="col tight"><strong>Sara Yang</strong> assigned you <strong>Migrate sessions table</strong><span class="muted" style="font-size:12px">1 hour ago</span></div></div>
    <div class="card row"><div class="avatar sm" style="background:linear-gradient(135deg,#fb923c,#dc2626)">DM</div><div class="col tight"><strong>Diego Martín</strong> approved your PR<span class="muted" style="font-size:12px">yesterday</span></div></div>
  </div>
</section></main>
```

---

## 13. Activity feed

```html
<main><section>
  <h2>Activity</h2>
  <div class="col" style="margin-top:8px">
    <div class="row" style="gap:10px;align-items:flex-start"><div style="width:8px;height:8px;border-radius:50%;background:#16a34a;margin-top:8px;flex:none"></div><div class="col tight" style="flex:1"><div><strong>Deployment succeeded</strong> · production · <span class="muted">2m</span></div><span class="muted">v1.42.0 — 23 commits since v1.41.7</span></div></div>
    <div class="row" style="gap:10px;align-items:flex-start"><div style="width:8px;height:8px;border-radius:50%;background:#4f46e5;margin-top:8px;flex:none"></div><div class="col tight" style="flex:1"><div><strong>Ava Singh</strong> merged <a href="#">#3014</a> · <span class="muted">14m</span></div><span class="muted">Switch session tokens to opaque format</span></div></div>
    <div class="row" style="gap:10px;align-items:flex-start"><div style="width:8px;height:8px;border-radius:50%;background:#d97706;margin-top:8px;flex:none"></div><div class="col tight" style="flex:1"><div><strong>Alert</strong> · checkout-service · <span class="muted">1h</span></div><span class="muted">Error rate above 0.5% for 5 minutes</span></div></div>
  </div>
</section></main>
```

---

## 14. Search results

```html
<main><section>
  <input type="search" placeholder="Search workspaces, notes, meetings…" autofocus>
  <p class="muted" style="margin-top:14px">7 results for <strong>"auth"</strong></p>
  <div class="col">
    <div class="card interactive"><div class="row"><div class="col tight" style="flex:1"><strong>Auth refactor plan</strong><span class="muted">last edited Tuesday · 8 steps</span></div><span class="pill primary">plan</span></div></div>
    <div class="card interactive"><div class="row"><div class="col tight" style="flex:1"><strong>Switch JWT to opaque sessions</strong><span class="muted">note · 3 days ago</span></div><span class="pill">note</span></div></div>
    <div class="card interactive"><div class="row"><div class="col tight" style="flex:1"><strong>Engineering sync — auth deep dive</strong><span class="muted">meeting · 1 week ago · 42m</span></div><span class="pill">meeting</span></div></div>
  </div>
</section></main>
```

---

## 15. Status / progress indicator

```html
<main><section>
  <h2>Sync status</h2>
  <div class="card">
    <div class="row"><strong>Uploading recording…</strong><span class="spacer"></span><span class="muted">14.2 MB of 21.4 MB</span></div>
    <div style="margin-top:10px;height:6px;background:var(--m-surface-alt);border-radius:3px;overflow:hidden"><div style="width:66%;height:100%;background:linear-gradient(90deg,#818cf8,#4f46e5)"></div></div>
    <div class="row" style="margin-top:10px;font-size:12px"><span class="muted">~12 seconds remaining</span><span class="spacer"></span><a href="#">Pause</a></div>
  </div>
</section></main>
```

---

## 16. Command palette / quick search

```html
<main>
  <div style="max-width:520px;margin:auto;background:var(--m-bg);border:1px solid var(--m-border-strong);border-radius:12px;box-shadow:var(--m-shadow-lg);overflow:hidden">
    <input type="search" placeholder="Type a command or search…" autofocus style="border:none;border-radius:0;border-bottom:1px solid var(--m-border);box-shadow:none;padding:14px 18px;font-size:15px">
    <div style="padding:8px">
      <div class="muted" style="padding:6px 12px;font-size:11px;text-transform:uppercase;letter-spacing:0.08em">Recent</div>
      <div class="row" style="padding:8px 12px;border-radius:6px;background:var(--m-accent-soft)"><span>📝</span><strong>New note</strong><span class="spacer"></span><span class="kbd">⌘N</span></div>
      <div class="row" style="padding:8px 12px"><span>🎙</span>Start recording<span class="spacer"></span><span class="kbd">⌘R</span></div>
      <div class="row" style="padding:8px 12px"><span>⚙</span>Settings<span class="spacer"></span><span class="kbd">⌘,</span></div>
    </div>
  </div>
</main>
```

---

## How to use these in a plan

In a `steps[].mockup`, drop the `<main>` block (or the fragment for non-`<main>` snippets) into the `html` field. Pick the right frame and a descriptive title:

```json
{
  "frame": "browser",
  "title": "app.example.com/login",
  "html": "<main><section style=\"max-width:380px;margin:auto\">...</section></main>"
}
```

Edit text, button labels, avatar initials, and colors. Don't add `<script>` (stripped at render). Don't paste Tailwind class names — they won't load. The preset utility classes (`row`, `col`, `card`, `pill`, `avatar`, `switch`, etc.) are all you need.
