A Fluent 2 design system for native Windows and Linux desktop apps, built on GPUI, the GPU UI framework from Zed.
fluent-gpui gives GPUI applications a complete, themed set of desktop controls
and application chrome in the style of Fluent 2: buttons, inputs, menus,
dialogs, trees, data tables, a ribbon command bar and a custom title bar. You
write ordinary GPUI views; the fluent-* crates supply the look, the tokens
and the behaviour. It is aimed at productivity-style desktop apps, not at the
web.
- Fluent 2 look on GPUI. Light, dark, high-contrast and right-to-left
variants of every control, driven by design tokens in
fluent-core. - Ribbon-centric layout. A ribbon with tabs, groups, contextual tabs and overflow, plus dock panels, panes and splits, a command palette, context menus, a tree and a data table.
- A frameless Fluent window.
FluentAppopens a window with the Fluent title bar, resize chrome, theme, modal and toast hosts and bundled assets. - Keyboard and accessibility. Visible focus, a keyboard path for every action, and roles, names and actions exposed through AccessKit (UI Automation on Windows, AT-SPI on Linux).
- Test utilities.
fluent-test-utilsdumps the accessibility tree and helps write in-process UI tests. - Native integration surfaces. A video surface, a terminal grid and view, and file pickers, with documented contracts.
- A vendored GPUI. A filtered snapshot of upstream Zed
mainis vendored, so every release builds against one known GPUI.
fluent-gpui is distributed by git tag. The latest release is
v4.0.0+zed.ba63a022c9a2 (the part after +zed. is the
Zed commit the vendored GPUI was cut from). Pin one exact tag on every
fluent-* crate you use:
[dependencies]
fluent-core = { git = "https://github.com/thedancingdeveloper/fluent-gpui", tag = "v4.0.0+zed.ba63a022c9a2" }
fluent-primitives = { git = "https://github.com/thedancingdeveloper/fluent-gpui", tag = "v4.0.0+zed.ba63a022c9a2" }
fluent-app = { git = "https://github.com/thedancingdeveloper/fluent-gpui", tag = "v4.0.0+zed.ba63a022c9a2" }
[dev-dependencies]
fluent-test-utils = { git = "https://github.com/thedancingdeveloper/fluent-gpui", tag = "v4.0.0+zed.ba63a022c9a2" }Not on crates.io (for 4.x). The names
fluent-core,fluent-app,fluent-primitives,fluent-layoutandfluent-ribbonexist on crates.io, but they are an older 2.x line that does not match this repository. Use the git tags.
Build requirements, the Linux packages and feature flags are in docs/architecture.md. On Debian or Ubuntu:
sudo apt-get install libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev libfontconfig-dev libwayland-dev libvulkan-devA window with the Fluent title bar and a counter. This is
examples/hello_world:
use fluent_app::FluentApp;
use fluent_core::gpui::{div, prelude::*, px, ClickEvent, Context, IntoElement, Render, Window};
use fluent_core::ThemeProvider as _;
use fluent_primitives::{Button, ButtonAppearance, Label, LabelSize};
struct Counter {
count: u32,
}
impl Render for Counter {
fn render(&mut self, _window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
let colors = cx.theme().colors.clone();
div()
.size_full()
.flex()
.flex_col()
.items_center()
.justify_center()
.gap(px(24.0))
.bg(colors.surface)
.child(Label::new(format!("Count: {}", self.count)).size(LabelSize::Display))
.child(
div()
.flex()
.flex_row()
.gap(px(8.0))
.child(
Button::new("increment")
.label("Increment")
.appearance(ButtonAppearance::Accent)
.on_click(cx.listener(|this, _: &ClickEvent, _, cx| {
this.count += 1;
cx.notify();
})),
)
.child(Button::new("reset").label("Reset").on_click(cx.listener(
|this, _: &ClickEvent, _, cx| {
this.count = 0;
cx.notify();
},
))),
)
}
}
fn main() {
FluentApp::new("Hello FluentGUI")
.window_size(480.0, 320.0)
.run(|cx| cx.new(|_| Counter { count: 0 }));
}FluentApp::run installs the theme, the modal and toast hosts and the window
title, opens a frameless window with the Fluent title bar and resize chrome, and
loads the bundled assets. Apps use GPUI through fluent_core::gpui, so they
never depend on gpui directly. For forms, a ribbon and a data table, read the
quick start guide.
Clone the repository and run any example with Cargo:
| Command | What it shows |
|---|---|
cargo run -p hello_world |
The smallest app, as above |
cargo run -p gallery |
Every control, by component family, with light, dark, high-contrast and RTL variants (guide) |
cargo run -p widgets |
A set of widgets in one window |
cargo run -p form |
A form built from Field and input controls |
cargo run -p demo_app |
A project-tracker style app with a ribbon, settings navigation and a data table |
cargo run -p screenshots -- <component> |
One component in a small window, used by the screenshots harness |
Every image on this page is a real render of the gallery or of one component, captured headlessly under Xvfb at 1000x600 (components) or 1280x800 (gallery).
| Dark | Light |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Dark | Light |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Dark | Light |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Dark | Light |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Dark | Light |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Dark | Light |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The gallery's pages, one per component family, in dark and light.
Each image is the component after a real Tab key press, showing its focus ring (dark theme on top, light below).
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Crate | What it provides |
|---|---|
fluent-core |
Theme, design tokens, colours, typography, motion, and the fluent_core::gpui re-export |
fluent-primitives |
Buttons, inputs, dropdowns, checkboxes, switches, badges, cards, tooltips, expander, scrollbar, date and time picker, input capture, video surface, terminal view |
fluent-layout |
Menus, context menus, toolbar with overflow, dock panels, panes and splits, tree, data table, dialogs, toasts, command palette |
fluent-ribbon |
The ribbon command bar: tabs, groups, contextual tabs, overflow |
fluent-app |
FluentApp, the title bar, client-side window chrome, bundled assets, file pickers |
fluent-test-utils |
Accessibility tree dumps and UI test helpers (use as a dev-dependency) |
| Platform | Renderer | Accessibility | Status |
|---|---|---|---|
| Windows 10/11 x64 | DirectX 11 | UI Automation | Supported |
| Linux x64, X11 and Wayland | wgpu (Vulkan, GL fallback) | AT-SPI | Supported |
| macOS, web / wasm | Not a target |
fluent-gpui is at version 4.x. Parts of it have had limited runtime validation. Plainly:
- Everything is built and tested on Windows and Linux in CI, including in-process GPUI tests. Screenshots are captured headlessly on Linux.
- On Linux the example apps have been launched under a headless Wayland compositor with software rendering. Runs on real GPU hardware and on a full X11 desktop session are still outstanding.
- On Windows the examples launch and the window states (minimise, maximise, restore, move, resize) behave on a real desktop. Rendered output could not be captured automatically, and pointer snap gestures and DirectX device-loss recovery have not been exercised.
- The video surface and backdrop blur are applied on both platforms but not yet
validated at runtime. Without the
backdrop-blurfeature, blur surfaces fall back to a solid tinted fill. - Screen reader testing is not yet part of the published validation record.
Details and the full list of known gaps: docs/maintainers/status.md.
Every control is reachable and operable from the keyboard: Tab and Shift+Tab move
focus, with a visible focus ring; Enter and Space activate; arrow keys,
Home/End and PageUp/PageDown move within lists, trees, tables and menus; Escape
closes popups; dialogs trap focus. Each control exposes a role, an accessible
name and its actions through AccessKit. The component index
lists the keyboard contract of every component, and fluent-test-utils lets you
test your own app's accessibility tree.
The full list is in docs/README.md. Start with:
- Quick start: dependency setup, a themed window, a form, a ribbon and a data table.
- Component index: every component with its states, keyboard contract and gallery page.
- Design tokens: colours, typography, spacing and motion.
- Architecture and consumer contract: layering, versions, feature flags.
- Native integration contracts: video, terminal and pickers.
- Changelog: release notes and migration notes.
The 4.0.0 release changes row and chrome sizes and a few signatures. The
migration steps are in the 4.0.0 section of the changelog.
It also adds Scrollbar, a Toolbar "More" menu, Button::loading, an
.error(bool) state on text-like inputs, window position save and restore, and
RowDensity.
- Contributions are welcome: see CONTRIBUTING.md and the code of conduct.
- Report vulnerabilities as described in SECURITY.md, not in a public issue.
- The
fluent-*crates are licensed under the Apache License, Version 2.0; see also NOTICE. The vendored Zed crates undervendor/zed/keep Zed's Apache-2.0 licence and notices; their origin is invendor/zed/UPSTREAM.mdand the changes made to them invendor/zed/PATCHES.md. - The Fluent 2 colour token structure was adapted from aernom/fluent-ui-gpui (MIT).
fluent-gpui is an independent project. It is not affiliated with, endorsed by or sponsored by Microsoft. "Fluent" refers to the publicly documented Fluent 2 design language; no Microsoft fonts or Office artwork are included. It is built on GPUI from Zed, which is licensed under Apache-2.0. Zed and GPUI belong to their respective owners.







































































































