Skip to content
Cook
Documentation Browse

Design

Menus and dialogs

Dialog, Dropdown Menu, Command Menu, Collapsible and Side Panel: everything that opens over or beside the page.

Dialog

A dialog asks one question. The primary action names what will happen, never just “OK”.

Confirm

Launch “Spring inspection” ad set?Marketing will publish 6 statics to Meta at $120/day. You can pause it any time.
CancelLaunch at $120/day
<Modal.Root open={open} onOpenChange={setOpen}>
  <Modal.Content>
    <Modal.Header icon={AdsMegaphoneIcon} title="Launch “Spring inspection” ad set?" />
    <Modal.Footer>
      <Button.Root variant="neutral" mode="stroke">Cancel</Button.Root>
      <Button.Root>Launch at $120/day</Button.Root>
    </Modal.Footer>
  </Modal.Content>
</Modal.Root>

Destructive

Delete “Morning brief”?The routine stops now. Past briefs stay in #chief-of-staff.
Keep itDelete routine
<Confirm destructive title="Delete “Morning brief”?" confirmLabel="Delete routine" onConfirm={remove} />

Properties

PropTypeDefaultDescription
openboolean—Controlled visibility.
onOpenChange(open: boolean) => void—Escape and an overlay click close it.
destructivebooleanfalseError tone for the confirm button.

Menus hold secondary actions. Destructive items go last, after a separator.

Workspace switcher

AAtlas Growth Co
Workspaces
AAtlas Growth Co
PPlano Roofing
MMesa Med Spa
New sub-account
Brand workspace
<Dropdown.Root>
  <Dropdown.Trigger asChild><WorkspaceButton /></Dropdown.Trigger>
  <Dropdown.Content align="start">
    <Dropdown.Group label="Workspaces">…</Dropdown.Group>
    <Dropdown.Separator />
    <Dropdown.Item><SubAccountsIcon /> New sub-account</Dropdown.Item>
  </Dropdown.Content>
</Dropdown.Root>

Row actions

Rename
Duplicate
Open live page
Archive
Delete funnel
<Dropdown.Item variant="error"><TrashIcon /> Delete funnel</Dropdown.Item>

Properties

PropTypeDefaultDescription
align"start" | "center" | "end""center"Alignment to the trigger.
side"top" | "bottom""bottom"Preferred side.
variant"default" | "error""default"Item tone.

Command Menu

One palette for going anywhere and starting anything. Type to filter; a group with nothing left hides.

Palette

Search or type a command…esc
Navigate
Open Morning BriefGB
Go to FunnelsGF
Go to CRMGC
Open DriveGD
Create
Ask Cook anything…⌘J
New routine
Clone a funnel
Install a playbook
Workspace
Switch workspace⌘O
Brand your workspace
Billing and spend cap
<CommandMenu.Dialog open={open} onOpenChange={setOpen}>
  <CommandMenu.Input placeholder="Search or type a command…" />
  <CommandMenu.List>
    <CommandMenu.Group heading="Navigate">
      <CommandMenu.Item onSelect={() => go("/brief")}>
        <MorningBriefIcon /> Open Morning Brief
      </CommandMenu.Item>
    </CommandMenu.Group>
  </CommandMenu.List>
</CommandMenu.Dialog>

Properties

PropTypeDefaultDescription
openboolean—Controlled visibility.
onOpenChange(open: boolean) => void—Called on ⌘K and Escape.
shouldFilterbooleantrueFilter items by the input value.

Collapsible

Shows or hides content with the 360ms accordion curve. The accordion keeps one item open at a time. Both below open and close.

Basic collapsible

Routine: Morning brief

Runs every day at 6:00. Reads yesterday's ad, lead and call numbers and posts a summary to #chief-of-staff.

Daily 06:00 Live

<Collapsible.Root>
  <Collapsible.Trigger asChild>
    <Button.Root variant="neutral" mode="ghost">Routine: Morning brief</Button.Root>
  </Collapsible.Trigger>
  <Collapsible.Content>Runs every day at 6:00…</Collapsible.Content>
</Collapsible.Root>

FAQ accordion

From the trycook.ai solution pages.

Do I need an existing business or audience?

No. Level one is Acquisition: the departments find the market and draft the offer before anything is live. You bring the decision, not the assets.

Will it sound like me?

It writes in your voice from your own material: your calls, your docs, your past messages. Correct it in the channel and it keeps the correction.

What does it do at night?

Reads performance, pauses what fatigued, replies to leads, posts the morning brief. Every action is in the log with the reason.

How do I stop it doing something?

Say so in the channel, or set the approval in settings. The Chief of Staff gates anything you flagged.

import * as Accordion from "@/components/ui/accordion";

<Accordion.Root type="single" collapsible defaultValue="q1">
  <Accordion.Item value="q1">
    <Accordion.Trigger>Do I need an existing business or audience?</Accordion.Trigger>
    <Accordion.Content>No. Level one is Acquisition…</Accordion.Content>
  </Accordion.Item>
</Accordion.Root>

Properties

PropTypeDefaultDescription
defaultOpenbooleanfalseOpen on first render.
openboolean—Controlled open state.
onOpenChange(open: boolean) => void—Called when the state changes.
type"single" | "multiple""single"Accordion only. How many items may be open.
disabledbooleanfalsePrevents toggling.

Side Panel

One card beside the conversation. It opens on the panel curve, closes faster than it opens, and can fill the chat area.

Chat with panel

Marketing
MarketingThe funnel draft is ready. I opened it on the right.
atlas-roofing.trycook.aiDraft
<SidePanelHost entry={entry} onClose={close}>
  <SidePanelHeader icon={FunnelIcon} title="atlas-roofing.trycook.ai" status={<Badge>Draft</Badge>} />
  <SidePanelBody surface="weak"><FunnelPreview id={id} /></SidePanelBody>
</SidePanelHost>
MeasureValue
Rail widthclamp(360px, 38cqw, 560px)
Wide55cqw
Minimum chat width320px
Covers the chat below672px