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
<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
<Confirm destructive title="Delete “Morning brief”?" confirmLabel="Delete routine" onConfirm={remove} />
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | — | Controlled visibility. |
onOpenChange | (open: boolean) => void | — | Escape and an overlay click close it. |
destructive | boolean | false | Error tone for the confirm button. |
Dropdown Menu
Menus hold secondary actions. Destructive items go last, after a separator.
Workspace switcher
<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
<Dropdown.Item variant="error"><TrashIcon /> Delete funnel</Dropdown.Item>
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
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
<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
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | — | Controlled visibility. |
onOpenChange | (open: boolean) => void | — | Called on ⌘K and Escape. |
shouldFilter | boolean | true | Filter 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
| Prop | Type | Default | Description |
|---|---|---|---|
defaultOpen | boolean | false | Open on first render. |
open | boolean | — | Controlled open state. |
onOpenChange | (open: boolean) => void | — | Called when the state changes. |
type | "single" | "multiple" | "single" | Accordion only. How many items may be open. |
disabled | boolean | false | Prevents 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
<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>
| Measure | Value |
|---|---|
| Rail width | clamp(360px, 38cqw, 560px) |
| Wide | 55cqw |
| Minimum chat width | 320px |
| Covers the chat below | 672px |