Radio Group
Single-select group, vertical or horizontal, arrow-key nav.
ui form
Preview
Installation
npx slintcn@latest add radio-groupUsage
import { RadioGroup, RadioOrientation } from "slintcn/components/radio-group.slint";
RadioGroup {
items: [{ label: "Free" }, { label: "Pro" }, { label: "Team" }];
selected <=> tier;
changed(i) => { /* … */ }
}
Properties
label
in
string
Label text rendered next to this RadioItem.
active
in
bool
Whether this RadioItem is selected.
show-focus
in
bool
When true, the focus ring renders even without keyboard focus.
disabled
in
bool
When true, this control dims and stops responding.
clicked
callback
()
Fired when this RadioItem is activated.
items
in
[RadioItem]
Options shown in the group.
selected
in-out
int
Two-way; index of the chosen item.
disabled
in
bool
When true, this control dims and stops responding.
orientation
in
RadioOrientation
`vertical` (default) or `horizontal`.
changed
callback
(int)
Fired with the new `selected` index.
API
RadioOrientationverticalhorizontalAccessibility
focusableyeskeyboardArrow keysSpaceDependencies
theme only
Installed automatically as transitive dependencies of slintcn add radio-group.