GPUI / OMARCHY
Native gpui-base components for Omarchy.
Part of GPUI Kit. Guided by Omarchy Style.
Rust + GPUI · Open source · MIT licensed
Explore the components
The Rust gallery, running in your browser with WebAssembly. Open gallery ↗ · View example source
Build with inputs and form controls, navigation, menus and popovers, and tables, lists and trees. Each guide explains state, keyboard behavior and composition.
Built on gpui-base.
Designed for Omarchy.
Omarchy is more than a palette. It's the relationship between quiet surfaces, clear edges, and the work in front of you.
GPUI Omarchy demonstrates how far gpui-base can go: shared behavior, freely customized presentation.
- GPUI Kit — the foundation
- A native Rust component ecosystem. GPUI Omarchy brings its building blocks into applications designed for the Omarchy desktop.
- gpui-base — freedom to customize
- Shared state and interaction primitives, freely customized presentation. This library puts that freedom into practice with a complete visual language of its own.
- Omarchy Style — the design language
- Square geometry, outlined actions, and purposeful layouts. Reads the Omarchy system palette, with Tokyo Night as the fallback.
Add to your application.
Declare the dependencies, then create your first window. Initialization loads your Omarchy theme automatically.
[dependencies]
gpui-kit = { version = "=0.6.0", default-features = false }
gpui-omarchy = "0.1.0"Save the example as src/main.rs and run cargo run.
use gpui_kit::{
AppContext, Context, IntoElement, ParentElement, Render, Styled, Window, WindowOptions,
};
use gpui_omarchy::{ActiveTheme, ButtonVariant, button, focus_scope, panel};
struct Hello {
clicks: usize,
}
impl Render for Hello {
fn render(&mut self, _: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
focus_scope("hello")
.size_full()
.bg(cx.omarchy().background)
.child(
panel("Welcome to Omarchy", cx).child(
button(
"hello",
format!("Clicked {} times", self.clicks),
ButtonVariant::Primary,
cx,
)
.on_click(cx.listener(|this, _, _, cx| {
this.clicks += 1;
cx.notify();
})),
),
)
}
}
fn main() {
gpui_kit::application().run(|cx| {
gpui_omarchy::init(cx);
cx.open_window(WindowOptions::default(), |_, cx| {
cx.new(|_| Hello { clicks: 0 })
})
.expect("open window");
cx.activate(true);
});
}