dfui 0.2.0

Declarative UI framework that draws shapes, text and icons analytically in one wgpu shader
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use dfui::widgets::{Overlays, Styled, button, column, overlays, snackbar, text};
use dfui::{Element, Handle};

fn page(ov: Handle<Overlays>) -> Element {
    button(text("Save"))
        .on_click(move |cx| ov.show(cx, |_| snackbar("Saved")))
        .into()
}

fn view() -> Element {
    column([overlays(page).into()]).fill().padding(16.0).into()
}

fn main() {
    dfui::run(view);
}