Foundations
Space and shape
A 4px grid, four control heights, and corners and shadows that tell you what kind of thing you are looking at.
Spacing
A 4px grid. Values off the grid snap to the nearest step (the smaller one on a tie). Only a 1px hairline may use a raw value.
- Sections are
space-8(32px) apart. - Rows are divided by one hairline, not by a gap.
Control heights
Shared heights for buttons and inputs. Controls in one row share the same height. Toolbars use sm. Forms and modals use md.
| Token | Value | Use |
|---|---|---|
| control-h-xs | 28px | Button xs and filter chips. |
| control-h-sm | 32px | Button sm, input sm and icon button md. |
| control-h-md | 40px | Button md and input md (default). |
| control-h-lg | 48px | Button lg (CTA on public surfaces). |
Corner radius
- Cards, panels and modals use
radius-lg(12px). - Buttons, inputs, menus and tooltips use
radius-md(8px). - Tags and keycaps use
radius-sm(4px). - The composer and your own bubble use
radius-xl(16px). - The pill,
radius-full, is only for filter chips and status badges. Don't make a button a pill.
4px
8px
12px
16px
9999px
Shadow
- A card has no shadow. It is told apart by its 1px
border. - Shadows are for floating things only. The composer, an approval request and a card on hover use
shadow-sm. Menus, popovers and tooltips useshadow-md. Modals useshadow-lg. - Behind a modal is
overlay-scrimwith an 8px blur.
Chips, cards on hover and the active segment.
Menus, popovers, hover cards and tooltips (with the popover surface and a 1px border).
Modals.
Panels that slide in from the side (the shadow falls to the right).
| Token | Value | Use |
|---|---|---|
| shadow-sm | Light: 0 1px 2px rgba(20, 16, 30, 0.06) Dark: 0 1px 2px rgba(0, 0, 0, 0.40) | Chips, cards on hover and the active segment. |
| shadow-md | Light: 0 8px 24px rgba(20, 16, 30, 0.12) Dark: 0 8px 24px rgba(0, 0, 0, 0.45) | Menus, popovers, hover cards and tooltips (with the popover surface and a 1px border). |
| shadow-lg | Light: 0 20px 40px rgba(20, 16, 30, 0.15) Dark: 0 20px 48px rgba(0, 0, 0, 0.55) | Modals. |
| shadow-panel | Light: 12px 0 24px rgba(20, 16, 30, 0.05) Dark: 12px 0 24px rgba(0, 0, 0, 0.35) | Panels that slide in from the side (the shadow falls to the right). |
Placement
- Before you wrap a block in a card, ask whether it is an object a person could pick up on its own. If it is not, group it with a heading and space, and divide its rows with the hairlines ofList.
- The console container is at most
container-max(1280px). The chat column ischat-column-max(860px). - Public surfaces have two widths: reading surfaces use
site-reading-max(1120px), and experience surfaces usesite-experience-max(1328px).
Breakpoints
There are four width breakpoints and two height breakpoints.
| Token | Value | Use |
|---|---|---|
| bp-sm | 640px | Below this width is mobile. A tall modal becomes full screen. |
| bp-md | 768px | Tablet. |
| bp-lg | 1024px | Desktop. |
| bp-xl | 1280px | Wide desktop. |
| short-height | 900px | Below this height, the progress box shrinks to 3 lines. |
| compact-height | 720px | Below this height, the padding of the header, the band and the composer shrinks too. |
Layout constants
Layout constants that several screens need to share.
| Token | Value | Use |
|---|---|---|
| container-max | 1280px | Maximum width of the console container. |
| container-padding | 24px | Horizontal padding of the container. |
| site-reading-max | 1120px | Width of reading surfaces among public surfaces (detail and legal pages). |
| site-experience-max | 1328px | Width of experience surfaces among public surfaces (landing and listing pages). |
| site-header-h | 68px | Height of the public site header. |
| chat-column-max | 860px | Maximum width of the chat column. |
| top-bar-h | 48px | Height of the console top bar. |
| mobile-bottom-bar-h | 56px | Height of the mobile bottom bar. |
| artifact-card-h | 178px | Height of an Output card. |
| artifact-card-preview-h | 120px | Height of the Output card preview. |
| account-panel-height | 52px | Height of the account panel at the bottom left. |
| account-panel-inset | 6px | Between the account panel and the screen edge. |
| account-panel-gap | 6px | Between the account panel and the sub-sidebar content. |
| overlay-blur | 8px | Background blur of the modal scrim. Source name --overlay-blur. |
Layers
Use named layers only. Do not add or subtract with calc. Local stacking order may use raw values from -1 to 5 only.
| Token | Value | Use |
|---|---|---|
| z-above | 10 | Sticky headers, resize handles and popovers inside a parent context. |
| z-float | 20 | Inline dropdowns inside a component and drop overlays. |
| z-float-top | 30 | Inline palettes and the site header menu. |
| z-sheet | 50 | Mobile inspector sheet of the canvas. |
| z-launcher | 90 | Floating voice launcher. |
| z-nav | 100 | Sub-sidebar. |
| z-nav-overlay | 110 | Overlay of the expanded panel. |
| z-topbar | 970 | Main top bar. |
| z-drawer-backdrop | 980 | Backdrop of the left panel. |
| z-drawer | 990 | Left panel. |
| z-sidebar | 1000 | Left sidebar. |
| z-shell | 1010 | Left column, mobile bottom bar and usage nudge. |
| z-shell-panel | 1020 | Right panel, account panel and guest sign-in. |
| z-shell-drawer | 1030 | Mobile drawer, mobile canvas and right sidebar. |
| z-shell-float | 1040 | Floating elements of the agent layout and the Ask capsule. |
| z-banner | 1050 | Disconnected banner. Above the shell, below modals. |
| z-modal-scrim | 1059 | Sheet scrim rendered as a separate sibling. |
| z-modal | 1060 | Modals, command palette and lightbox. |
| z-popover | 1070 | Menus, popovers, dropdowns and hover cards. They must show inside a modal too. |
| z-tooltip | 1080 | Tooltips. |
| z-modal-top | 1090 | Re-authentication. Above even open menus and tooltips. |
| z-theme-overlay | 1100 | Crossfade for the theme switch. |
| z-celebration | 1110 | Celebration screen. |
| z-celebration-fx | 1111 | Confetti. |
| z-fly | 1120 | Flying chip. |