Crate gpui_markup

Crate gpui_markup 

Source
Expand description

gpui-markup - A declarative markup DSL for building GPUI applications.

This crate provides a Rust-native syntax for building GPUI UIs:

ui! {
    div @[flex, flex_col, w: px(200.0), bg: theme.secondary] {
        div @[text_size: px(16.0)] {
            "Hello World",
        },
    }
}

Which expands to:

div()
    .flex()
    .flex_col()
    .w(px(200.0))
    .bg(theme.secondary)
    .child(
        div()
            .text_size(px(16.0))
            .child("Hello World")
    )

Macros§

ui
A declarative markup macro for building GPUI UIs.