Components / EmptyState

EmptyState

What an area shows when it has nothing: icon, title, sentence and actions.

Example

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

Code

use ravenrs::prelude::*;

fn empty_state() -> impl View {
    EmptyState::new("No photos yet")
        .icon(IconName::Image)
        .description("Import a folder to start. The originals stay where they are.")
        .action(Button::new("Import"))
        .action(Button::new("Learn more").style(ButtonStyle::Ghost))
}

Open in the playground, with every example →

Full API of EmptyState →