ui!() { /* proc-macro */ }Expand description
Build a GPUI element tree declaratively.
Elements take style tokens, key = value builder calls, and call-style
args; children go in braces, and if/for/match expand to real Rust
control flow. See the crate README for the full token reference.
ⓘ
use declarative_gpui::ui;
use gpui::prelude::*;
let view = ui! {
col(gap_4 p_16 bg_1c1a17 rounded_lg) {
text("Hello" text_lg semibold text_f5f0e8)
for item in items {
row(gap_2) { text(item.name) }
}
}
};