GPUI Material
English | 中文
Build native Rust desktop applications with Material 3 Expressive components for GPUI. The library provides Material color, typography, shape, and motion, with GPUI Base handling input, focus, and window services.
Try the Gallery
Run the Gallery from a source checkout. Search for a component in the sidebar, try its interactive examples, and switch between light and dark themes. Resize the window on the Adaptive layout page to see navigation and content panes respond to the available space.
Windows 11 x64 with the MSVC toolchain is the primary supported environment. macOS ARM64 and Linux x64 receive CI builds and automated tests. See Development and verification for prerequisites on each platform.
Use in an application
Use Rust 1.99.1 or later with the 2024 edition. Add gpui-material = "0.1.2" to your dependencies. The integration guide lists the matching GPUI packages and shows a complete window example.
Initialize MaterialRoot and call gpui_material::init_components before opening a window through MaterialRoot::open_window. Build views from the gpui_material facade and keep controlled values and command outcomes in your application.
use Button;
let save = new
.on_activate;
Components and features
- Actions and selection. Buttons, floating actions, checkboxes, radio groups, switches, chips, and sliders.
- Content and feedback. Cards, lists, badges, progress indicators, loading indicators, and snackbars.
- Input and overlays. Filled, outlined, multiline, and secure text fields, exposed dropdowns, menus, tooltips, dialogs, and sheets.
- Navigation and layout. App bars, tabs, navigation bars and rails, scaffolds, list-detail, supporting panes, and feeds.
Enable optional features on gpui-material for additional components and theme capabilities.
| Feature | Adds |
|---|---|
expressive-groups |
Button groups and split buttons |
toolbars |
FAB menus, floating toolbars, and docked toolbars |
search |
Search bars and search views |
date-time |
Date, date range, and time pickers |
carousel |
Six carousel layouts |
dynamic-color |
Color schemes generated from a seed color |
serde |
Serialization for theme data |
See the component guide for supported controls, variants, and optional component features.
Project documentation
- Documentation website
- Downstream integration
- Architecture and dependencies
- Documentation index
- Contributing
- Changelog
License
Original project code and documentation are licensed under Apache-2.0. See Third-party notices for bundled assets and dependency notices.