-
Notifications
You must be signed in to change notification settings - Fork 9
Component ButtonGroup
MeowLynxSea edited this page Jun 13, 2026
·
4 revisions
A horizontal or vertical container that visually groups buttons. Each child is a Stateful<Div> (typically another button(...) element).
use yororen_ui::headless::button_group::button_group;use yororen_ui::headless::button::button;
use yororen_ui::headless::button_group::button_group;
button_group("align", cx)
.attached(true)
.child(button("left", cx).caption("Left").render(cx))
.child(button("center", cx).caption("Center").render(cx))
.child(button("right", cx).caption("Right").render(cx))
.render(cx)| Method | Purpose |
|---|---|
vertical() |
Stack the children top-to-bottom (default: horizontal). |
attached(v) |
Visually merge children into a single segmented control. |
child(stateful) |
Append one rendered child (Stateful<Div>). |
- Factory takes
(id, _cx). - Children are passed in already-rendered form (call
.render(cx)on the child component first and pass the result to.child(...)). -
.render(cx)returnsStateful<Div>.
Button, IconButton, ToggleButton, SplitButton
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.