Components / Card

Card

Grouped surface lifted off the canvas.

Example

The component itself, running in WebAssembly, beside its code in a playground. Try it.

Code

use ravenrs::prelude::*;

fn card() -> impl View {
    Card::new(
        VStack::new((
            Text::new("Quarterly report").style(TextStyle::Headline),
            Text::new("A grouped surface, lifted off the page.").foreground(Semantic::InkMuted),
        ))
        .spacing(4.0),
    )
    // Set it on the chosen card of a group.
    .selected(false)
}

Open in the playground, with every example →

Full API of Card →