-
Notifications
You must be signed in to change notification settings - Fork 9
Component Tag
MeowLynxSea edited this page Jun 18, 2026
·
4 revisions
A selectable / closable chip. Distinct from Badge: Tag carries a click and an optional × button; Badge is purely visual.
use yororen_ui::headless::tag::tag;
tag("lang-rust", "rust", cx)
.closable(true)
.on_close({
let entity = cx.entity();
move |_, cx| entity.update(cx, |s, _| s.tags.retain(|t| t != "rust"));
})
.render(cx)| Method | Purpose |
|---|---|
selected(v) |
Apply the selected visual state. |
closable(v) |
Show the × button. |
on_click(closure) |
Fn(&ClickEvent, &mut Window, &mut App) + 'static + Send + Sync. |
on_close(closure) |
Fn(&mut Window, &mut App) + 'static + Send + Sync. |
disabled(v) |
Disable both on_click and on_close. |
Label is set at construction. .render(cx) returns Stateful<Div>.
Yororen UI v0.3.0 · repository · Apache-2.0 · This wiki documents Yororen UI v0.3.0.
This wiki documents Yororen UI v0.3.0 — the headless-core, swappable-renderer build.