RavenRS · Rust GUI

RichText

Edit and run the RichText 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 rich_text() -> impl View {
    let opened = State::new(String::from("No link opened yet"));
    let told = opened.clone();
    VStack::new((
        RichText::new(
            "*Ready:* _your order_ ~left~ is at `Desk 4`.\n* Details at https://example.com/orders\n> Open until six",
        )
        .on_link(move |address| told.set(format!("Asked to open {address}"))),
        Text::bound(&opened, Clone::clone).style(TextStyle::Caption).foreground(Semantic::InkMuted),
    ))
    .spacing(8.0)
    .align(Align::Stretch)
    .width(360.0)
}

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