-
Notifications
You must be signed in to change notification settings - Fork 9
Component Checkbox
MeowLynxSea edited this page Jun 18, 2026
·
6 revisions
A boolean toggle.
use yororen_ui::headless::checkbox::checkbox;
checkbox("tos", cx)
.checked(self.agreed)
.on_toggle({
let entity = cx.entity();
move |new, _, cx| entity.update(cx, |s, _| s.agreed = new);
})
.render(cx)| Method | Purpose |
|---|---|
checked(v) |
Current checked state. |
disabled(v) |
Disable interaction. |
on_toggle(closure) |
Fn(bool, &mut Window, &mut App) + 'static + Send + Sync. |
has_custom_tone(v) / custom_tone(hsla)
|
Override accent color. |
Factory takes (id, cx) (mints a focus handle). .render(cx) returns Stateful<Div>. No state entity.
See also: Switch, Radio, ToggleButton.
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.