Skip to content
GitHub (opens in a new tab)

Empty first run

A new billing workspace with no invoices: one Create invoice, opt-in sample data and a one-line setup status.

Install

Not exported from agentic-ds-kit. add copies the source into your app (components/patterns/empty-first-run/) with this contract beside it, and the app-shell example it renders into components/patterns/app-shell/ (kept if you already have it). You own the copies: pass your nav through shell, replace the plans and sample rows, wire onCreate and onOpenSetup, and keep the must lines.

npx agentic-ds-kit add empty-first-run

Also copies app-shell beside it, which this pattern builds on (kept if you already have it).

Usage

import { EmptyFirstRunPattern } from "@/components/patterns/empty-first-run";

<EmptyFirstRunPattern />

What a copy keeps

The contract’s must lines: the kit look and accessibility. Ask before breaking one.

  • Use kit components from agentic-ds-kit for anything the kit has; no local cousins (tables, dialogs, rows, rules, charts)
  • Semantic tokens only (agentic-ds-kit/tokens.css); no raw hex, no primitive --color-* ramps
  • Exactly one appearance="solid" mode="primary" Button per view: Create invoice in Empty while the list is empty, in PageHeader once it has rows, and Create draft while the Modal is open (Create invoice turns outline)
  • Do not restyle kit components; change them through their props, slots, and tokens
  • Wrap every labeled input in Field (label, hint, and error wiring)
  • The setup line is a count, what's left and one ghost Button to the page that holds SetupGuide; never render SetupGuide or its task list here
  • After Create draft, open the new record (onCreate is where your app routes to it)
  • Sample data is app data, marked by an info Alert with Clear sample data; it never counts as real invoices
  • Render inside a main landmark (wrap the pattern, or your page content, in <main>); header and nav chrome, if any, use AppHeader / SideNav (or other header / nav landmarks) and nav stays reachable on small screens

Defaults you can change

  • Shell: the app-shell example (EMPTY_FIRST_RUN_DEMO_SHELL): layout inset, layout-shell--viewport; Northwind workspace, Home (3/5 badge) and Billing (Invoices, Customers, Plans), account Maya Chen
  • Header: PageHeader Invoices, subtitle Northwind · billed in USD, no action while empty
  • Empty: kind first-use, size lg, icon ReceiptText; No invoices yet / Each invoice bills one customer for a plan. Add the customer as you go.
  • Controls md 36 when wide; lg 40 below the shell's breakpoint, with the Empty actions stacked full width
  • Modal md: New invoice / Saved as a draft. Nothing is sent yet.; Customer (Combobox, new name inline), Plan (Select), Due date (DatePicker); Cancel, then Create draft
  • Sample data: three rows (Paid, Open, Overdue in words) in a Table with stack below 480px

Built from

  • Component
    →

    Empty

    Placeholder when a list, page, or region has nothing to show.

  • Component
    →

    LoadError

    What a list, card, chart or page shows when its data failed to load: an icon, what failed, a reference and Try again.

  • Component
    →

    SideNav

    Product side nav: brand header, icon items, optional badges, closeable; variant single (one column that closes to an icon rail) or rail-subnav (a fixed icon rail plus a SideNav.SubNav column with the picked parent's rows).

  • Component
    →

    PageHeader

    Top-of-page title with optional Breadcrumb trail, subtitle, actions, page Tabs, a profile Avatar and a decorative cover.