Skip to content

RadioGroup

import { RadioGroup } from "std-widgets.slint";
export component Example inherits Window {
width: 200px;
height: 150px;
RadioGroup {
title: "Target Platform";
model: [
{ text: "Desktop" },
{ text: "Mobile" },
{ text: "Embedded" },
];
current-index: 0;
}
}
slint
radiogroup example

A group of radio buttons where the user can select exactly one option.

int (in-out) default: 0

The index of the selected entry in model.

RadioGroup {
model: [
{ text: "Desktop" },
{ text: "Mobile" },
];
current-index: 1;
}
slint

string (in-out) default: ""

The text of the currently selected entry.

bool default: true

When false, the entire group and all its radio buttons cannot be interacted with.

bool (out) default: false

Set to true when any radio button inside the group has keyboard focus.

struct RadioEntry default: []

The list of options to display. Each entry has text and an optional disabled flag.

RadioGroup {
model: [
{ text: "Desktop" },
{ text: "Mobile", disabled: true },
];
}
slint

RadioEntry

Represents one option in a RadioGroup.

  • text (string): Label shown next to the radio button.
  • disabled (bool): When true, this option is visible but not selectable.

string default: ""

An optional label rendered above the group. When empty, no title is shown.

enum Orientation default: vertical

Use Orientation.vertical (default) to stack options, or Orientation.horizontal for a single row.

Orientation

Represents the orientation of an element or widget such as the Slider.

  • horizontal: Element is oriented horizontally.
  • vertical: Element is oriented vertically.

Invoked when the user selects a different option. The argument is the text of the newly selected entry.

RadioGroup {
model: [
{ text: "Desktop" },
{ text: "Mobile" },
];
selected(value) => {
debug("Selected: ", value);
}
}
slint

© 2026 SixtyFPS GmbH