Components / SplitButton

SplitButton

A main command with a menu of alternatives.

Example

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

Code

use ravenrs::prelude::*;

fn split_button() -> impl View {
    SplitButton::new("Save")
        .icon(IconName::Check)
        .on_click(|| {})
        .item(MenuItem::new("Save and close").on_select(|| {}))
        .item(MenuItem::new("Save and new").on_select(|| {}))
}

Open in the playground, with every example →

Full API of SplitButton →