-
Notifications
You must be signed in to change notification settings - Fork 9
Component IconButton
MeowLynxSea edited this page Jun 18, 2026
·
5 revisions
A square button that holds an icon instead of a caption.
use yororen_ui::headless::icon::IconSource;
use yororen_ui::headless::icon_button::icon_button;
icon_button("close", cx)
.icon(IconSource::Named(IconName::Close))
.on_click(|_, _, _| { /* close */ })
.render(cx)| Method | Purpose |
|---|---|
icon(source) |
The IconSource to render. |
icon_size(px) |
Size of the icon (the button pads around it). |
variant(v) |
ActionVariantKind::Neutral (default) / Primary / Danger. |
disabled(v) |
Disable interaction. |
on_click(closure) |
Fn(&ClickEvent, &mut Window, &mut App) + 'static + Send + Sync. |
.render(cx) returns Stateful<Div>. No state entity.
See also: Button, ToggleButton, Icon.
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.