RavenRS · Rust GUI

Badge

Edit and run the Badge RavenRS example in your browser. Explore its Rust code and download a Cargo project for desktop and WebAssembly.

One declarative Rust interface, GPU rendering, reactive state and semantic design tokens. Free and open source under MIT OR Apache-2.0.

Rust source

fn badge() -> impl View {
    HStack::new((
        Badge::new("Neutral"),
        Badge::new("New").tone(Tone::Accent),
        Badge::new("Paid").tone(Tone::Success).icon(IconName::Check),
        Badge::new("Overdue").tone(Tone::Danger),
        Badge::new("Draft").outline(),
        // ravenrs-lint: allow(raw_color) a tag keeps the color its owner picked for it, in every theme
        Badge::new("Family").color(Color::hex(0x8b5cf6)).height(26.0),
    ))
    .spacing(8.0)
    .wrap()
}

The interactive preview loads when JavaScript and WebGPU or WebGL2 are available. You can read the guide and examples here at any time.

More examples