A Rust GUI framework built on GPUI with a Fluent 2-inspired design language and a ribbon-centric command model.
FluentGUI is a reusable, open-source framework that gives Rust applications a coherent Fluent 2 design language on top of GPUI — the GPU-accelerated, reactive UI engine from the Zed editor. It is purpose-built for desktop applications that need a polished, professional shell: ribbon bars, resizable dock panels, menus, modals, data surfaces, and full token-driven theming.
What it is:
- A complete application shell (title bar, menu bar, ribbon, dock panels, pane splitting)
- A design-token layer mapping Fluent 2 colors, spacing, radii, and type to GPUI primitives
- A library of interactive widgets (inputs, dropdowns, comboboxes, trees, data tables, toasts, modals, and more)
- Live dark/light theme switching with per-entity reactive subscription
What it is not:
- A general-purpose layout engine or CSS replacement
- A wrapper around a web renderer
- A port of WinUI/XAML
Overview.mp4
Add the crates you need to your Cargo.toml:
[dependencies]
gpui = "0.2.2"
fluent-app = "2.0.2" # application entry point and window chrome
fluent-layout = "2.1.1" # Workspace and application layout surfaces
fluent-core = "2.1.1" # design tokens and theme (transitive — usually not needed directly)A minimal application:
use fluent_app::FluentApp;
use fluent_layout::Workspace;
fn main() {
FluentApp::new("My App")
.dark_theme()
.run(|cx| cx.new(|cx| Workspace::new(cx)));
}See the examples/ directory for progressively richer starting points.
The workspace is split into five independently versioned and published crates. Depend on as many or as few as your application needs.
| Crate | Version | Description |
|---|---|---|
fluent-core |
Design tokens: semantic colors, spacing, radii, typography, component geometry defaults, and the reactive Theme global |
|
fluent-primitives |
Base interactive widgets — buttons, inputs, dropdowns, comboboxes, checkboxes, avatars, badges, spinners, tooltips, and more | |
fluent-ribbon |
RibbonBar with tabs, groups, large/compact/toggle/stack buttons, contextual tabs, and overflow handling |
|
fluent-layout |
Application shell — Workspace, MenuBar, ContextMenu, DockPanel, Pane, PaneGroup, Tree, DataTable, Dialog, Toast, and more |
|
fluent-app |
FluentApp builder, frameless title bar, and global initialization of theme, modal, and toast stacks |
fluent-app
└── fluent-layout
└── fluent-ribbon
└── fluent-primitives
└── fluent-core
Each layer only depends on layers below it. You can use fluent-primitives standalone if you do not need the ribbon or full application shell.
Themeglobal withapply_dark(),apply_light(),toggle()— reactive to all subscribed entitiesColorScheme— full Fluent 2 semantic token set (surface, stroke, fill, accent, status colors)SpacingTokens,RadiiTokens,TypographyTokens,ComponentTokensMotionTokens— easing and duration constants for popup and transition animations
| Widget | Notes |
|---|---|
Button, IconButton, ToggleButton |
Accent / Neutral / Subtle / Hyperlink appearances, multiple sizes |
TextInput, Textarea, Searchbox |
Full GPUI IME, clipboard, and focus integration |
Field |
Label + description + validation wrapper for any form control |
Dropdown, Combobox |
Entity-backed, anchored option popover, keyboard navigation |
Checkbox, Switch, RadioGroup |
— |
Tooltip |
Hover-triggered; wraps any element |
Spinner, ProgressBar |
Indeterminate and determinate variants |
Avatar, Chip, Badge, Icon, Label, Divider |
— |
RibbonBar— tab strip + content row, theme-reactiveRibbonTabBuilder/RibbonGroupBuilder— declarative construction- Item types:
LargeButton,Button,IconButton,ToggleButton,Stack,Separator ContextualTabDef— show/hide tabs based on application state- Overflow: groups collapse into a More dropdown when width is insufficient
Application shell
Workspace— assembles title bar, menu bar, ribbon, dock panels, pane area, and modal hostMenuBar— horizontal application menu (File | Edit | View | …) with keyboard navigation and shortcut hintsDockPanel— resizable, collapsible edge panel (left / right / bottom / top)Pane/PaneGroup— content area with optional tab strip; horizontal and vertical splits with draggable dividersTabStrip/TabItem
Menus & overlays
ContextMenu— right-click floating menu with icon gutter, shortcuts, separators, checkboxes, radio items, and cascading submenusModalStackglobal +ModalHostrenderer — click-outside dismiss, multipleModalSizeoptionsDialog— title / body / actions layout withModalStackintegrationPopover— generic floating content surfaceCommandPalette— Ctrl+K fuzzy-search command launcher
Data & feedback
Tree— hierarchical selection surface with chevrons, icons, disabled rows, callbacksDataTable— dense tabular surface with sortable columns, selection, loading/empty/error statesToolbar— compact command stripMessageBar— inline info / success / warning / error surface with optional dismissToast/ToastHost— global notification stack with auto-dismiss and manual dismiss
Settings UI
SettingsNav— collapsible section sidebar for settings dialogs with active-item accent bar
FluentAppbuilder — configures the window and initializes theTheme,ModalStack, andToastStackglobalsTitleBar— frameless, draggable, with min / max / close controls.dark_theme()/.light_theme()startup options
| Example | What it shows |
|---|---|
hello_world |
Minimal FluentApp window — the smallest possible starting point |
widgets |
Gallery of all fluent-primitives widgets |
form |
Form layout with Field, validation states, SettingsNav, and a Dialog |
demo_app |
Full application shell: Workspace, MenuBar, RibbonBar, DockPanel with a Tree, TabStrip, ContextMenu, CommandPalette, and live dark/light theme switching |
gallery |
Scrollable overview of all framework components in a single window |
Run any example from the workspace root:
cargo run -p demo_app- Token-driven theming — every color, spacing value, radius, and type size flows from
fluent-coretokens; no magic constants in widget code. - Reactive by construction — entity-backed views subscribe to the
Themeglobal viacx.observe_global::<Theme>()in their constructor; theme changes propagate automatically through framework shells and subscribed application views. - Minimal API surface — builder patterns with sane defaults; GPUI internals are not exposed unless there is no other option.
- Ribbon-first command model — the
RibbonBaris the primary command surface; commands are declared and the framework handles layout, overflow, and contextual visibility. - Apache-2.0 throughout — every public API and implementation is independently authored on Apache-2.0 foundations, safe for use in proprietary applications.
| Requirement | Version |
|---|---|
| Rust (MSRV) | 1.88 |
| GPUI | 0.2.2 |
| Platform | Linux (X11 / Wayland), macOS — Windows support follows GPUI |
The GPUI version is deliberately pinned. Upgrades are documented in docs/STATUS.md.
# Debian / Ubuntu
sudo apt-get install libxkbcommon-dev libxkbcommon-x11-dev# Build everything
cargo build --workspace
# Run all tests
cargo test --workspace
# Lint
cargo clippy --workspace --all-targets -- -D warnings
# Format check
cargo fmt --all --checkLicensed under the Apache License, Version 2.0.
FluentGUI does not incorporate any GPL-licensed code. The Fluent 2 color token structure was adapted from aernom/fluent-ui-gpui (MIT).