SegmentedButton
import { SegmentedButton } from "@material";export component Example inherits Window { width: 300px; height: 100px; background: transparent; SegmentedButton { items: [ { icon: @image-url("../icons/share.svg"), text: "Share" }, { icon: @image-url("../icons/music_note.svg"), text: "Music" } ]; current-index: 0; }}
slint

A SegmentedButton
displays a group of related options as a single control, where only one option can be selected at a time.
Properties
Section titled “Properties”current-index
Section titled “current-index”int (in-out)
default: 0
The index of the currently selected item.
[struct SegmentedItem] default: a struct with all default values
SegmentedItem
This structure represents an item in a segmented button control.
icon
(image): The icon to display for the item.text
(string): The text label for the item.
An array of segmented items, each containing an icon and text.
Callbacks
Section titled “Callbacks”index-changed(index: int)
Section titled “index-changed(index: int)”Invoked when the current-index changes.
Functions
Section titled “Functions”select(index: int)
Section titled “select(index: int)”Selects the item at the specified index.
© 2025 SixtyFPS GmbH