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
<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.
<Banner.Root data-shell-banner="setup">
Connect Google so Sales can book onto your calendar.
<Banner.Action>Connect</Banner.Action>
</Banner.Root>
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
status | "information" | "success" | "warning" | "error" | "feature" | "information" | Tone family. |
variant | "filled" | "light" | "lighter" | "stroke" | "lighter" | Surface weight. |
dismissible | boolean | true | Show the close button when there is no action. |
Badge
Badges label state. They are small, quiet and never the primary action.
Status
<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.
import { TYPE } from "@/lib/constants";
<AssetChip type="funnels" /> // FunnelIcon in TYPE.funnels.color
Filled and counts
<Badge.Root variant="filled" color="blue">Launch · Level 2</Badge.Root>
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
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
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
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | One short line. |
description | string | — | Optional second line. |
action | { label, onClick } | — | One action, usually Undo. |
duration | number | 4000 | Milliseconds before it closes. |
Tooltip
Every icon-only button gets a tooltip with its name and, where one exists, its shortcut.
Icon toolbar
<Tooltip.Root>
<Tooltip.Trigger asChild><CompactButton.Root><SearchIcon /></CompactButton.Root></Tooltip.Trigger>
<Tooltip.Content>Search <kbd>⌘K</kbd></Tooltip.Content>
</Tooltip.Root>
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
side | "top" | "right" | "bottom" | "left" | "top" | Preferred side. |
delayDuration | number | 300 | Hover delay in ms. |
Progress and Levels
Cook opens one level at a time: Acquisition, Launch, Scale. Meters show spend against the cap.
Levels
- AcquisitionMarket and offer
- LaunchFunnel, ads, leads
- 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
<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
<EmptyState title="No leads yet" description="New leads land here as they come in." />
Loading and skeleton
<PageLoader label="Loading your workspace…" />
<Skeleton className="h-4 w-2/3" />
Error
From the docs pages under When something goes wrong.
<ErrorState code="provider-busy" onRetry={retry} />