Pho Design System

Status View

One view for a region with nothing to show or nothing that worked — icon over title over description, with an optional action row. The block shrink-wraps and centers itself; text stays left-aligned so the icon / title / description share one edge. The host decides the footprint: drop it in a card body, or wrap it in min-h-screen flex centering for a full page. Use size="sm" inside cards and panels; the default base for whole pages.

Empty and error states are the same component — they differ only in what you pass (icon, role, actions), not in how they look.

Import

import { StatusView } from "@photon-ai/pho-ui/components/status-view";

Sizes

Two sizes, retuning every slot. Title and description share Dialog’s font-display ladder — base matches Dialog (gap-1); sm steps one rung down (no gap):

No API keys yet
Create one to call Photon from CI or a server.
sm
No API keys yet
Create one to call Photon from CI or a server.
base
<StatusView size="sm" icon={<IconKey />} title="No API keys yet" />
<StatusView size="base" icon={<IconKey />} title="No API keys yet" />

Empty

A quiet placeholder for a region with nothing to show yet. Usually no action row — the create affordance normally lives elsewhere on the page.

No API keys yet
Create one to call Photon from CI or a server.
<StatusView
  size="sm"
  icon={<IconKey />}
  title="No API keys yet"
  description="Create one to call Photon from CI or a server."
/>

Error

For failures, pass a warning icon, role="alert" so the state announces, and actions offering a way out — retry, reload, or a route back.

This page couldn't load
Reload to try again, or go back.
<StatusView
  role="alert"
  icon={<IconAlertTriangle />}
  title="This page couldn't load"
  description="Reload to try again, or go back."
  actions={
    <>
      <Button size="sm" onClick={() => window.location.reload()}>
        Reload
      </Button>
      <Button size="sm" variant="outlined" onClick={() => window.history.back()}>
        Back
      </Button>
    </>
  }
/>

Not found

The same view covers 404s — one action routing back is enough.

Page not found
This address doesn't exist, or the page has moved.
<StatusView
  role="alert"
  icon={<IconAlertTriangle />}
  title="Page not found"
  description="This address doesn't exist, or the page has moved."
  actions={
    <ButtonLink href="/" size="sm">
      Go home
    </ButtonLink>
  }
/>

Guidelines