Skip to content
Cook
Documentation Browse

Design

Status and feedback

Alert, Badge, Toast, Tooltip, Progress and Levels, and the empty, loading and error states: how Cook tells you what is happening.

Alert

An alert states a condition and the one action that fixes it. Use the error tone only when something actually failed.

Status alerts

Research is reading 214 Reddit threadsThe teardown lands in #research in about 4 minutes.
Funnel publishedatlas-roofing.trycook.ai is live with its booking page.
Spend cap at 90%Ads pause automatically at $2,000 this month.
Raise cap
Meta needs reconnectingThe sign-in for Atlas Ads expired. Marketing paused its hourly read.
Reconnect
<Alert.Root status="warning" variant="lighter">
  <Alert.Icon as={SpendCapIcon} />
  Spend cap at 90%
  <Alert.Action>Raise cap</Alert.Action>
</Alert.Root>

Shell banner

The setup bar sits above the page card. One height, whichever prompt applies.

Finish setup: connect Google so Sales can book onto your calendar.Connect
<Banner.Root data-shell-banner="setup">
  Connect Google so Sales can book onto your calendar.
  <Banner.Action>Connect</Banner.Action>
</Banner.Root>

Properties

PropTypeDefaultDescription
status"information" | "success" | "warning" | "error" | "feature""information"Tone family.
variant"filled" | "light" | "lighter" | "stroke""lighter"Surface weight.
dismissiblebooleantrueShow the close button when there is no action.

Badge

Badges label state. They are small, quiet and never the primary action.

Status

LiveDraftNeeds approvalPausedFailedVerifiedAI
<Badge.Root color="green" variant="lighter"><Badge.Dot />Live</Badge.Root>

Asset types

Every Cook asset type with its icon and palette colour, from Colors.

LeadsFunnelsCopyAdsOffersResearchEmailsContentWikiReportsDocsImagesSheetsVideoAudioOther
import { TYPE } from "@/lib/constants";

<AssetChip type="funnels" /> // FunnelIcon in TYPE.funnels.color

Filled and counts

Launch · Level 2YOLO312 new
<Badge.Root variant="filled" color="blue">Launch · Level 2</Badge.Root>

Properties

PropTypeDefaultDescription
color"gray" | "blue" | "green" | "orange" | "yellow" | "red" | "purple" | "sky" | "pink" | "teal""gray"Tone.
variant"filled" | "light" | "lighter" | "stroke""lighter"Weight.
size"small" | "medium""small"Height 16 or 20px.

Toast

A toast confirms what just happened, bottom right, for 4 seconds. Offer undo for anything reversible.

Tones

Funnel publishedatlas-roofing.trycook.ai is live.
Spend cap at 90%Ads pause at $2,000 this month.
Meta needs reconnectingMarketing paused its hourly read.
Routine archived
Undo
import { toast } from "@/components/ui/toast";

toast.success("Funnel published", { description: "atlas-roofing.trycook.ai is live." });
toast("Routine archived", { action: { label: "Undo", onClick: restore } });

Properties

PropTypeDefaultDescription
titlestring—One short line.
descriptionstring—Optional second line.
action{ label, onClick }—One action, usually Undo.
durationnumber4000Milliseconds before it closes.

Tooltip

Every icon-only button gets a tooltip with its name and, where one exists, its shortcut.

Icon toolbar

Search ⌘K
<Tooltip.Root>
  <Tooltip.Trigger asChild><CompactButton.Root><SearchIcon /></CompactButton.Root></Tooltip.Trigger>
  <Tooltip.Content>Search <kbd>⌘K</kbd></Tooltip.Content>
</Tooltip.Root>

Properties

PropTypeDefaultDescription
side"top" | "right" | "bottom" | "left""top"Preferred side.
delayDurationnumber300Hover delay in ms.

Progress and Levels

Cook opens one level at a time: Acquisition, Launch, Scale. Meters show spend against the cap.

Levels

  1. AcquisitionMarket and offer
  2. LaunchFunnel, ads, leads
  3. ScaleFeed winners, add clients
<VerticalStepper.Root current={level}>
  <VerticalStepper.Item>Acquisition</VerticalStepper.Item>
  <VerticalStepper.Item>Launch</VerticalStepper.Item>
  <VerticalStepper.Item>Scale</VerticalStepper.Item>
</VerticalStepper.Root>

Credit meter

AI credits6,200 of 10,000
Ad spend cap$1,812 of $2,000
<ProgressBar value={91} color="orange" />

Empty and Loading States

Loading shows the solid mark hopping. Empty shows the mono mark in the soft text colour. An error says what happened and what to do.

Empty

No leads yetNew leads land here as they come in.
Nothing scheduledBookings appear here once a client picks a time.
No files hereDrop a file to add it to this folder.
<EmptyState title="No leads yet" description="New leads land here as they come in." />

Loading and skeleton

Loading your workspace…
<PageLoader label="Loading your workspace…" />
<Skeleton className="h-4 w-2/3" />

Error

From the docs pages under When something goes wrong.

The AI model was too busyThe company that runs the model turned the request away. Nothing you did caused it.
Try againWhat happened
<ErrorState code="provider-busy" onRetry={retry} />