Toggle Group
Single-select row of toggles.
ui form
Preview
Installation
npx slintcn@latest add toggle-groupUsage
import { ToggleGroup, ToggleGroupItem } from "slintcn/components/toggle-group.slint";
ToggleGroup {
items: [{ label: "Left" }, { label: "Center" }, { label: "Right" }];
selected <=> align;
}
Properties
items
in
[ToggleGroupItem]
Toggles shown in the group.
selected
in-out
int
Two-way; index of the active toggle.
changed
callback
(int)
Fired with the new `selected` index.
API
Accessibility
focusableyeskeyboardEnterSpaceDependencies
theme only
Installed automatically as transitive dependencies of slintcn add toggle-group.