Skip to main content

Module surface

Module surface 

Source
Expand description

Rounded content surfaces and non-interactive information components.

Enums§

Status

Functions§

alert
Inline feedback in a softly tinted surface with semantic theme colors.
avatar
A circular identity marker. Supply initials or an icon in the fallback slot; callers can replace it with avatar_image through the base image builder.
avatar_image
An image slot sized to its avatar. Image loading and failure policy remain with the application, matching gpui-base’s explicit slot API.
badge
empty_state
keycap
keycap_for_action
The keycaps for whichever binding the keymap resolves for action, or None when nothing is bound. The lookup reads the last rendered frame, so context-scoped bindings show once their context has been painted.
keycaps
A row of keycaps, one per keystroke, e.g. ["⌘Q"] or ["ctrl+k", "ctrl+s"].
keystroke_label
One keystroke as a single keycap label: ⌘Q on macOS, ctrl+q elsewhere.
keystroke_labels
Split a keystroke into the labels this platform prints on its keys: on macOS symbols in its order (⌃⌥⇧⌘) with capitalized keys like its menus, elsewhere lowercase words in macOS’s style (ctrl alt shift super).
panel
progress
Determinate progress, clamped to 0..=100; non-finite values become zero.
separator
toast
Notification surface; compose actions and use gpui-base’s ToastManager for application-owned stacking and timeout policy.
vertical_separator
A vertical rule for toolbars. Override height to fit a different row size.