gpui-ai

Components

37 components, each with a live demo running the real Rust — and the 13 decorations you can paint into them.

50 of 50

Progress

  • Loading state

    A token-driven pixel field for work whose duration is not yet known.

    LoadingState

  • Status badge

    One status pill for every lifecycle, swapping states in a fixed slot.

    StatusBadge

  • Thinking

    Expandable reasoning traces in structured step and prose forms.

    Thinking

  • Orbs

    A reduced-motion-aware ambient signal for background AI activity.

    Orbs

  • Context meter

    Context-window usage as a ring, bar, or text with severity tones and a breakdown.

    ContextMeter

Agent work

  • Tool chips

    Compact, typed status for tool calls without hiding their lifecycle.

    ToolChip

  • Tool calls

    Collapsible tool-call cards with input, output, approval, and a shimmering group.

    ToolCall

  • Task rows

    Progressive task rows with stable identity and readable state.

    TaskRow

  • Web search

    Search results with readable citations, metadata, and progressive state.

    SearchResults

  • To-do list

    A stable-ID checklist for plans that change while an agent works.

    TodoList

  • Image generation

    Image generation progress, preview, and error states in one frame.

    ImageGeneration

Readable output

  • Streaming text

    Selectable streaming Markdown with citations, sources, and follow-ups.

    StreamingText

  • Code block

    Selectable code with language context and progressive reveal.

    CodeBlock

  • Code diff

    A unified patch with line gutters, change tints, per-hunk accept or reject, and a copyable source.

    CodeDiff

  • Selection actions

    Ask, explain, and rewrite actions anchored to selected Markdown.

    SelectionActions

Composites

  • Chat

    A virtualized controlled conversation with tail-follow, unread behavior, in-place edit, and branch versions.

    Chat

  • Suggestions

    Starter and follow-up prompt chips that ripple in and report stable IDs.

    Suggestions

  • Attachment previews

    Composer and message attachments with thumbnails, kinds, upload state, and typed open or remove events.

    AttachmentStrip

  • Artifact panel

    A side panel for generated documents and code with preview and source views, versions, actions, and streaming state.

    ArtifactPanel

  • Fine-tune card

    A controlled property inspector for precise model and design settings.

    FineTuneCard

  • Prompt bar

    A hybrid-controlled composer with mentions, commands, models, and attachments.

    PromptBar

  • Voice controls

    Dictate and speak controls with a live level meter and interim transcript, as typed intent.

    VoiceControls

  • Message queue

    Prompts waiting while the agent runs, with reorder, edit, send-now, remove, and clear by stable ID.

    MessageQueue

Navigation

  • Command search

    Keyboard-first command discovery backed by stable application IDs.

    CommandSearch

  • Sidebar navigation

    Filterable, accessible navigation for growing AI workspaces.

    SidebarNav

  • Thread list

    A grouped conversation list with search, archived threads, and typed row actions.

    ThreadList

Data tables

  • Records table

    A controlled virtualized records grid for large, changing datasets.

    RecordsTable

  • Diff table

    A virtualized before-and-after proposal grid with explicit change state.

    DiffTable

  • Filter table

    A controlled task grid with typed filters and stable-row reorder motion.

    FilterTable

  • Comparison table

    A bounded feature matrix with semantic values and sticky context.

    ComparisonTable

Decisions

  • Approval card

    An explicit, keyboard-operable human gate with destructive and always-allow variants and resolved states.

    ApprovalCard

  • Plan card

    An agent's proposed steps with typed per-step status, approve or reject while proposed, and resolved states.

    PlanCard

  • Recommendation card

    A focused recommendation with rationale and typed actions.

    RecommendationCard

Evidence

  • Context cards

    Compact source context that preserves provenance and readable detail.

    ContextCard

  • Insight card

    Paged analytical findings with chart-ready, semantic values.

    InsightCard

Human in the loop

  • Form controls

    Single-choice groups and toggles in the library's own grammar.

    ChoiceGroup

  • Question flow

    A short sequence of questions an agent asks before it acts.

    QuestionFlow

Decorations

  • Photo

    The photograph with nothing between it and the words. Its own colours, not the theme's - a decoration is the application's, and nothing here has to follow the palette. Also the reason the next one exists.

    Decorations

  • Frosted

    Actual frosted glass: the backdrop blurred on the CPU and placed by the same numbers as the sharp copy behind it, so the two line up. GPUI has no backdrop filter — this works because the parent knows where both are.

    Decorations

  • Glass

    Glass rather than frost: a convex bevel, Snell's law across its normal, and the view under the rim squeezed where the surface tips over. Frosted blurs what it covers; this lenses it.

    Decorations

  • Tint

    Translucency and an edge highlight, no blur. Cheaper, honest about it, and what most panels actually need.

    Decorations

  • Border beam

    Nine patches of colour sitting still around the frame, and a window of brightness sweeping over them. The colours never travel - that is the whole difference between light passing through a frame and a coloured head chasing its own tail.

    Decorations

  • Liquid metal

    The same stroke with a metallic ramp instead of a beam. Metal is not a light: it snaps from dark to bright and back, because it reflects a small bright thing rather than emitting.

    Decorations

  • Photo + scrim

    The same photograph under a fixed dark scrim — a flat black at sixty per cent, chosen by hand and identical in every theme. The commonest thing anyone will actually want.

    Decorations

  • Dither

    A photograph quantised to four inks by an 8x8 ordered dither, in the theme's own colours. Rasterised on a theme change, never while drawing.

    Decorations

  • Pop art

    The same photograph, flattened to three flat bands with no dither between them — the print the dither is avoiding.

    Decorations

  • Cross-hatch

    Cross-hatching whose density follows the photograph's tone, the way an engraver carries shade — ink laid down or not, never half.

    Decorations

  • Halftone

    A grid of dots on a travelling wave, on the library's motion channel. It stops when the panel scrolls out of view.

    Decorations

  • Pulse

    The same rings on the motion channel instead of a press, so they keep arriving — and stop when the panel scrolls away.

    Decorations

  • Veil

    The over layer, not the under one: a gradient across the content, passing every click through to what it covers.

    Decorations