Introduction
Pre-releaseComponents for GPUI that you copy into your app and own.
hyuskui is a set of components for GPUI, the GPU-accelerated UI framework behind the Zed editor. It is not a crate you depend on. You add a component and its source lands in your project, as plain Rust you can read and change.
Why copy instead of depend?
A component library you depend on decides your styles for you. When the design needs to change, you end up wrapping, overriding, or forking it. With hyuskui the code is already yours: open src/ui/button.rs and edit it.
- Open code. Every component is one readable file, built only on
gpui. - One theme. All colors and radii come from a single
Themeglobal you control. - Familiar styling. GPUI's builder API reads like Tailwind, so the styles map one to one with the web previews on this site.
- Native speed. Components render on the GPU through Metal, Vulkan, or DirectX.
It looks like Tailwind
If you have used Tailwind, GPUI styling will feel familiar. This is the core of the default button:
div()
.flex()
.items_center()
.gap_2()
.px_4()
.h_9()
.rounded_lg()
.bg(theme.primary)
.text_color(theme.primary_foreground)
.child("Save changes")About the previews
GPUI draws native windows, so it cannot run inside a web page. The previews on this site are HTML replicas built from the same tokens, sizes and radii as the Rust source. What you see is what the native widget draws.
Status
hyuskui is pre-release, and component APIs may change. Add components with cargo hyuskui add, or copy them by hand from each component page. Start with Installation.