OpenProgram Docs

Surface system

Navigation and content each have their own interaction language, in light and dark themes alike.

Left rail --bg-input Centre column --bg-primary Right rail --bg-input Deep page behind the cards: --bg-secondary Rails keep a 7px gutter; the centre card sits 7px off top and bottom
Deep page
--bg-secondary
Left and right rails
--bg-input, 7px gutter
Centre column
--bg-primary, 7px off top and bottom

The two surfaces

Deep: railsPanel: content, dialogs
ComponentsList rows: conversations, branches, favouritesButtons, pills, cards
IdleNo border, outline or fillVariant face (below)
Hover, selectedVisible grey, --bg-hover or --bg-selected; text stays --text-primary or --text-secondaryThe variant's hover
Brand colourOnly tiny .indicator-dot indicators: a dense, scanned list must stay calmPrimary action
Shell geometry
PartRule
Railsshadcn Sidebar floating shell (components/ui/sidebar.tsx); centre takes its inset idea
Cardrounded-lg (12px), per-theme --composer-shadow, no border or ring. Split panes and the canvas overview share --radius-lg.
Why white railsThe rails share a material with the input box and user bubble; those stand out on the centre card
Split layout.center-col[data-split]: the centre card dissolves, each pane is a card of the same material, 7px to rails and edges, 8px apart. Empty panes draw the card themselves.
Collapsed rail--rail-collapsed-w 62px; components/layout/use-resizable-rail.ts carries the same number
FocusNo mouse focus ring on buttons; keyboard focus is a small brightness change. Top-strip role="tab" uses each theme's --focus-ring.

One list-row recipe

Sidebar nav and content-pane rows (MCP drawio, + Add server) are one box. + Add server is the same row as + New chat, slightly muted.

Height
--ui-list-h, 30px
Padding, gap
6px 8px, 12px
Radius
--ui-list-radius
Idle
Transparent
Hover, selected
--bg-hover, never --bg-input (white on a white rail disappears)

Source: .ui-list-item in apps/web/app/styles/base/list-row.css. Page list columns use RailItem (secondary rail); MCP .serverItem matches its metrics.

Buttons

apps/web/components/ui/button.tsx is the shadcn radix-nova Button from the official registry. Local changes: imports, a forwardRef for React 18, px-pinned sizes and one look: rounded-md (8px) at every size, no border, raised by the composer shadow pair (shadow-raised, shadow-raised-hover). Colour alone marks the role. Tier tables: Design tokens.

VariantFace, hoverUse
defaultbg-primary; primary/90One main action per area: Run, Save, Test, Apply, Send, New
elevated--bg-input; deeper shadow. Pressed, checked or on: 1.5px primary ring.Every other action; composer triggers, environment chips. A choice among a few is a groove (below).
destructivebg-destructive/10; /20Delete, Remove, Stop, Clear history
ghostTransparent, no shadow; bg-muted (/50 dark)Icon tools hidden until hover: close, more, rename
linkPrimary text; underlineInline

All press 1px while active, show a 3px ring/50 on keyboard focus, and go to 50% when disabled. Sidebar rows are not Buttons: use .ui-list-item or nav-classes.ts. outline and secondary are not offered. Toggle and ToggleGroup offer the same face as elevated, with a tint for on, and the segmented groove.

  • What cannot be a <Button> (a span hosting its own ✕, a Radix trigger span) uses cn(buttonVariants({ variant, size })); the cn() merge resolves border-transparent against the variant's border.
  • A 1 to 2px height mismatch inside a header row (search, pills, icon buttons) is a bug.

Choosing one of a few

List Board Calendar Groove: --groove with an inset shadow. Face: --bg-input with shadow-raised. The face slides to the chosen option; groove corner = face corner + padding.

Two materials make every control: a face (--bg-input, shadow-raised: cards, buttons, inputs, menus) and a groove (bg-groove: a step below the surface in light themes, the deep page in dark ones; shadow-groove), which only ever holds a single choice. No glass.

ControlRule
View, filter or settingA groove 32px tall (--ui-choice-h 26px options, 3px around), so it reads as large as the raised 30px controls beside it; the options are plain text and a face (SlidingThumb) slides under the chosen one, running past it by 8% of the distance (at most 8px), swinging back once and settling; the groove's walls stop it at the ends. ToggleGroup variant="segmented", Tabs, or CAPSULE_GROOVE with CAPSULE_OPTION from components/ui/capsule.ts for a row a page builds itself.
SizesEvery choice on a page is the default 32px, so choices side by side match. sm only in a compact tool palette (the image annotator), xs only inside a list row.
CountsA quiet number after the label, never a pill: a pill weighs the option's right side and pulls it off centre under the face.
DragLike a finger: pressed anywhere in the groove, the face glides under the pointer at once and follows it while held (each frame closing a third of the gap); the option under the pointer on release is chosen.
Page sectionOne size up (TabsList variant="section", or SECTION_GROOVE, SECTION_OPTION), centred on the line between header and content (SECTION_BAR). The new content slides in from the side the switch moved towards (SectionSlide, or TabsContent by itself).
CornersRounded rectangles like every other control, concentric: the face takes the button's 8px (rounded-md), the groove that plus its padding (rounded-groove, 11px; a section switch 8 + 4 = rounded-xl). Smaller groups step down together (sm: 8 in 10, xs: 6 in 8). No capsule: it would be the one round-ended shape on the page.
Several on at onceToggleGroup variant="elevated": each option is a face; on is a primary/12 tint with primary ink
Colour or shape swatchThe only choice that keeps a 1.5px accent ring: the swatch itself is the content
Long or changing listSelect (below)

Selects and menus

Every fixed-list choice is the radix-nova Select (components/ui/select.tsx). No native <select>, no hand-rolled listbox. SimpleSelect is the one-line form (value, onValueChange, options, label, placeholder, size; groups as {label, options}).

PartRule
TriggerA face: rounded-lg, bg-input, shadow-raised (deeper on hover and while open), no border, --ui-button-h or -sm. Default w-full max-w-48; call sites add only width; an error is a destructive ring.
PopupSolid bg-popover in the menu frame, item-aligned, z-[130] above dialogs. Muted heading names the choice (label, else aria-label), one per group. Plain check on the chosen row.
Empty valueRadix reserves "": an option with that value uses a sentinel inside SimpleSelect; otherwise "" shows the placeholder
Other menusDropdownMenu, popover pickers, sidebar footer, tab and function context menus use MENU_PANEL, itemCls, GROUP_LABEL, MENU_SEPARATOR from components/ui/menu/menu-styles.ts. A CSS module keeps only placement.

Action menus from a small button or right-click build rows with MenuRow (components/ui/menu/menu-parts.tsx), in the page and the desktop overlay (DesktopContextMenuItem carries glyph and keys). apps/web/scripts/ui/check-menu-rows.mjs holds every menu file to it. Left to right:

SlotRule
IconSolar Bold Duotone (MenuIcon, 16px, muted). Folder rows in --folder-color, destructive rows red.
LabelFills the row
KeyPrice tag (MenuKey): 10px tip, the rounded end of Solar's tag-horizontal mirrored left, joined to a shadcn Kbd plate, 18px tall, square at the tip, 5px round at the right, 1px 6px padding around at least 8px of text. Paint --menu-key-bg, ink at 12% over the popover. Text from formatMenuKeys: ⌘T, ⇧⌘C, or Ctrl+T, Ctrl+Shift+C. Shows only keys that work; no global shortcut exists just to fill a tag.
CheckMenuCheck; unchecked rows in a group keep the column (CHECK_SLOT_PAD)
SubmenuTrailing chevron, any depth
Lit rowHover, keyboard, open submenu or active row: muted icon, key and chevron turn bright, icon pops 1.12, key plate ink at 22%. A tinted icon keeps colour and only pops.
Menu frame and geometry

Tokens in app/globals.css, shared by menus, Select popup, Popover, command palette and page preview. Light themes: --popover-ring transparent, --popover-shadow is --composer-shadow, --popover-shadow-hover is --composer-shadow-focus. Dark themes lift the popup a step, keep a light hairline and soft deep shadow, with no hover change.

PartNova, at the docs' scale
Panelrounded-lg p-1 min-w-32, solid bg-popover
Rowmin-h-7 (28px), rounded-md, px-1.5 py-1, text-fs-base, gap-1.5, size-4 icons not shifted
Hoverbg-accent (ink at 9%), text-bright
Labelpx-1.5 py-1 text-fs-xs font-medium, muted
Separator-mx-1 my-1, 1px, --border
ShortcutMenuKey, text-[11px], muted
ChosenAccent MenuCheck at the end, never a fill

--popover is --bg-input: white in light themes, one step above the page in dark. Menus, Select popup and dialogs are one surface; only the accent check is the app's own.

Inputs and borders

One single-layer 1px edge (border: 1px solid var(--border), fill --bg-input) in Settings, dialogs, plugins and MCP editors. Hover keeps the border; no 2px halo on focus.

Dialogs

Every modal is radix-nova Dialog or AlertDialog (components/ui/). No hand-rolled backdrops, no browser confirm().

PartNova, at the docs' scale
Overlaybg-black/10, no backdrop blur, z-[110], data-native-view-occluder
Contentrounded-xl bg-popover ring-1 ring-foreground/10 p-4 gap-4 max-w-sm z-[120]
Title, descriptiontext-fs-md font-medium; text-fs-base muted
Footer-mx-4 -mb-4 border-t bg-muted/50 p-4, right-aligned, Cancel first, Buttons only: elevated Cancel or Close, default main
Closeghost icon-sm, top-2 right-2 (Dialog only)
Motion100ms fade and zoom-in-95, no slide
ConfirmationConfirmDialog or await confirmAction({...}) through <ConfirmDialogHost /> in app/providers.tsx. destructive when it deletes or lowers a safeguard. Escape, outside click and Cancel all cancel.
Three answersawait chooseAction({..., alternateLabel}) adds a third button on the left, as macOS sets Don't Save apart from Cancel and Save.
Module classSizes only: width, max-width: none, max-height, overflow
Edge-to-edgeSource viewer, function runner, provider setup: p-0 gap-0, own padding, DialogFooter m-0

Settings rows

BlockShape
SettingsPageTitle (with optional actions at the end of its row), description, scrolling body
SettingsSectionTitled group on one Card, hairline dividers
SettingsRowHorizontal Field: name and description left, control right (a lone Select is 12rem). stacked puts a wide control under the name.

In components/settings/settings-ui.tsx. Controls: Switch, Input, Textarea, Slider, RadioGroup, ToggleGroup, Checkbox, Button, SimpleSelect. A tab has no row, label or card CSS of its own.

History project tabs

Settings and Info use the same blocks. Chats, Memory, Settings and Info share one layout: fixed head and tab bar, each panel scrolls edge to edge (Settings and Info with a 24px edge). Chats groups by recency, one titled Card per group.

Today, Last 7 days and the newest group start open, older ones folded; the choice per group is remembered in this browser. An open group lists 8, then "Show all N" (10 or fewer: all). A toolbar button expands or folds all; a search opens all. apps/web/scripts/projects/check-project-tabs.mjs (in npm run check) guards this.

Composer controls

PartRule
Environment chipsChannel, web surface, project, folders, DAG HUD: elevated sm; add-folder icon-sm
Bottom rowPermission, model, Agent, effort, plus, tools, context ring: elevated, sm or icon-sm; old rules handed back with revert-layer. Height follows its chips, 10px under the box, as the environment chips sit above it.
Glyphs in both rows16px, 5px gap, centred, 13px labels, set unlayered in the rows' module CSS because Button sizes would shrink an unsized svg to 12.25px. The effort card keeps its sizes.
Send, micColours from variants (send default, ghost when empty, destructive to stop; mic ghost). Size from app/styles/design/composer.css: --composer-action-size (28px), centred in --composer-line-h (46px), --composer-action-inset. Mic hover is --composer-action-hover because --muted is the box's colour.
Input box--composer-* tokens: --bg-input, no border, shadow-sm, shadow-md on hover or focus (alpha 0.1 light, 0.25 dark), no ring, --radius-lg

Web page preview and browser toolbar

PartRule
Preview framecomponents/center-tabs/pip/web-tab-pip.tsx: bg-popover in the menu frame, 10px corners, stage clipped alike. Pinned to the native view's corner radius in apps/desktop/main/web-views/web-views.js, which the DOM cannot clip; the two change together.
32px headerTitle text-fs-base font-medium text-text-primary, status text-fs-xs text-text-muted, ghost icon-sm buttons, 14px icons, HoverTip + TipBody (hover tips). A resume error is one line of text-fs-xs text-destructive.
CSS moduleGeometry only: unlayered module rules would beat the utilities
Browser toolbarwebToolbarButton() (components/center-tabs/browser/toolbar/toolbar-button.ts): ghost icon-sm, held at 26px by .webToolbarBtn in the 40px row

Agent cards

PartRule
Card--bg-input, --composer-shadow (deeper on hover), no border, xl corner, 14px inside
GridRaised cards in columns of at least 260px
ContentsAvatar (40px), name, Default on the default Agent, up to three lines of description
SettingsStay in the quick panel, whose open card wears the 1.5px --accent-blue ring
GroupsTwo by the always-on switch, each with an md title and one muted line
Always-on surf

Foam lines drift diagonally toward the lower right, each a soft crest with a broader wash on its seaward side, every line ragged in its own way.

AspectRule
LayersTwo, the card fill with text ink mixed in at 14% and 9%, each masked by a seamless SVG tile; 56s and 72s a tile, so lines pass and cross
One fieldSheenField offsets each card's layers by grid position, again on resize; all drifts share a start, so lines continue across cards and gaps and scroll with them
MotionOne whole tile per cycle as a compositor animation: no jump, no repaint. Still under reduced motion.
LimitsNo colour of its own, nothing over the text

Don'ts

Don'tWhy, or instead
A new hover, selected, border or pill treatmentAdd a line here first. Budget: deep grey hover, panel, brand fill, the face and the groove.
Brand fills on the deep surfaceA brand pill reads as an alert
Different metrics for MCP or any other content-pane listOne set of metrics for every content-pane list
Hover motion (translate-y, scale-105)Applies to either surface
Editing button.tsx classes at a call site, or restating a Button in CSSPick a variant and size; remove an overriding legacy rule or use revert-layer
A settings description overflowing into the control column, or label above controlLabel above control only in stacked

Implementation status

StatusItems
ImplementedEvery part in components/ui is radix-nova, every former <select> and dropdown included: Command, Popover, Tooltip (--surface-tooltip, --text-on-tooltip alias --foreground, --background), Tabs (the capsule groove), Kbd, ScrollArea, Sidebar. Every modal and confirmation. Menu panels and rows, Settings General, desktop attention, composer parts, preview, browser toolbar.
ExceptionThe attachment lightbox keeps its own full-screen viewer
Not yetOther Settings pages (settings-page.module.css rows); form inputs outside Settings keep the 1px rule until they move to the shadcn input
Last updated · 2026-11-25