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:

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

Macros§

ui
A declarative markup macro for building GPUI UIs.