Components / TagBox
TagBox
Several values from a list, shown as tags.
Example
The component itself, running in WebAssembly, beside its code in a playground. Try it.
Code
use ravenrs::prelude::*;
fn tag_box() -> impl View {
let tags = State::new(vec![String::from("urgent")]);
TagBox::new(
tags.binding(),
vec![
LookupItem::new("urgent", "Urgent"),
LookupItem::new("review", "To review"),
LookupItem::new("paid", "Paid"),
],
)
.allow_new(true)
.label("Tags")
}