Expand description
Material 3 adapters for Longbridge GPUI Kit.
The kit is layered so each layer can be replaced without touching the ones above it:
| Layer | Module | Holds |
|---|---|---|
| Color | color (gpui-kit-material-color) | palettes, roles, scheme derivation |
| Theme | theme | the painted scheme, palette transitions, theme::color |
| Tokens | tokens | shape, type scale, layout metrics, elevation, state layers |
| Motion | motion | M3 springs, entrances, retargetable values |
| Icons | icons | Google Material Symbols through icons::Assets |
| Components | components | Material presentation over Kit components and Base parts |
Reuse [gpui_kit::component] controls where their presentation hooks meet the
Material contract; [gpui_base] supplies behavior for uncovered parts. This
kit owns the Material appearance and motion, not another generic UI runtime.
Call gpui_kit::init and then init once at startup. Use Kit’s
open_window for the single Root, register icons::Assets, and initialize theme::init_component_theme before Root’s first
render. Advance theme::advance_component_theme from input events and
pre-frame callbacks. Base-only consumers can paint with
theme::apply_scheme at the start of each root render.
Re-exports§
pub use gpui_kit_material_color as color;
Modules§
- components
- Material components. Each module documents the M3 component it
implements and what remains for M3 Expressive (
docs/ROADMAP.md). - icons
- Material Symbols rendered through Longbridge Kit’s Component Icon.
- motion
- The motion vocabulary: M3 springs, entrances and retargetable values.
- prelude
- The roles, tokens and components most pages need, including the
theme::colorlookup. The crate root’scoloris the color module. - theme
- The painted scheme: what
colorreturns on the current frame. - tokens
- Design tokens. Geometry is in px where it must not follow the text scale and in rems (14px = 1rem at 100%) where it shares a ruler with text.
Functions§
- init
- Register the kit’s key bindings. Call once, before opening windows.