Skip to content

GPUI Base

gpui-base is the unstyled foundation of the GPUI Component Rust desktop application framework. It provides interaction behavior, controlled state, focus management, accessibility semantics, animation, virtual lists, and theme tokens while leaving layout and visual design to your application.

Choose the right layer

UseWhen
gpui-baseYou are building a design system and want to own every visual choice.
gpui-componentYou want a complete set of styled, ready-to-use desktop components.

The dependency points one way: gpui-component builds on gpui-base. Applications can use either layer directly.

Principles

  • Behavior is built in. Controls provide consistent pointer, keyboard, focus, and state behavior.
  • Presentation is yours. Compose GPUI style methods and children without fighting default visuals.
  • Parts stay composable. Primitives expose their meaningful subparts instead of hiding markup behind a monolith.
  • State stays explicit. Controlled inputs report changes and your view owns the resulting state.

Start building

Follow Getting started, render selectable Markdown and HTML with TextView, learn how to add window-level text selection to custom renderers, then explore the primitive catalog. Each page includes Rust snippets and a live WASM example backed by the same example crate that can run natively.

Three systems are larger than a primitive and have pages of their own. Motion provides typed transitions, springs, keyframes, presence, and sequencing. Virtual List renders lists of any length by drawing only what is on screen, with per-item sizes rather than a uniform row height. Dock is a full workspace shell — nested splits, tab groups, a tiles canvas and edge docks — whose layout is pure data you can build and serialize without a window, and whose every pixel comes from renderer traits you implement.