Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Surface primitives

Linear: AUT-121

Foundational rendering primitives — Surface, Badge, Divider, Kbd, IconTile. Every other UI surface composes from these.

Surface

Five kinds — pick one per surface. Drives the background, border, and shadow tokens applied.

Open as live demo →

SurfaceKindUse for
BaseApp canvas, full-window background
ElevatedPanels, cards, tray-popover body
PopoverDropdowns, command menus (stronger drop shadow)
SelectedHighlighted list row inside a menu
GlassTranslucent overlay over a recording (uses backdrop-filter)
#![allow(unused)]
fn main() {
use ui_storybook::components::{Surface, SurfaceKind};

view! {
    <Surface kind=SurfaceKind::Popover>
        <p>"Tray menu content here"</p>
    </Surface>
}
}

Badge

Open as live demo →

Six kinds, each maps to a recurring badge usage in the recorder:

BadgeKindUse for
NeutralDefault emphasis ("Beta")
AccentQuiet highlight ("New", "Recommended")
DangerError counts / destructive states
LiveActive recording — pulses
PlanPlan / tier label (outlined, small caps)
CountNumeric counts inside menu rows

Divider

Thin separator. Two orientations:

  • Horizontal — full width, 1px tall. Default.
  • Vertical — 1px wide, stretches to parent height. Use inline for toolbar separators.

Kbd

Keyboard-shortcut chip. Pass an ordered slice; each element renders as a <kbd>:

#![allow(unused)]
fn main() {
use ui_storybook::components::Kbd;

view! { <Kbd keys=vec!["⌘", "⇧", "R"] /> }
}

IconTile

Small square tile for inline icons / monograms. Five kinds:

IconTileKindUse for
WorkspaceWorkspace monogram (gradient background)
DeviceDevice avatar (mic / camera / display)
AppSystem app icon (Spotify, Zoom, …)
ActionLeading glyph on an action menu row
UserUser avatar

Composition over inheritance

None of these primitives know about each other. A higher-level component like a device-picker row composes Surface + IconTile + Badge + Kbd together by passing children — the primitives stay independent and reusable in any product surface.