-
Notifications
You must be signed in to change notification settings - Fork 9
Component Disclosure
MeowLynxSea edited this page Jun 18, 2026
·
5 revisions
A collapsible header. Toggles a panel of children open / closed.
use yororen_ui::headless::disclosure::disclosure;
disclosure("advanced", cx)
.open(self.show_advanced)
.on_toggle({
let entity = cx.entity();
move |new, _, cx| entity.update(cx, |s, _| s.show_advanced = new);
})
.child(/* the body that gets collapsed */)
.render(cx)| Method | Purpose |
|---|---|
open(v) |
Current open/closed state. |
disabled(v) |
Disable the toggle. |
on_toggle(closure) |
Fn(bool, &mut Window, &mut App) + 'static + Send + Sync. |
child(el) |
The body the renderer collapses/hides based on open. |
Factory takes (id, _cx). .render(cx) returns Stateful<Div>. No state entity — the parent view owns the boolean.
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.