SegmentedButton
import { SegmentedButton } from "material.slint";export component Example inherits Window { width: 300px; height: 100px; background: transparent; SegmentedButton { model: [ { icon: @image-url("icons/list.svg"), text: "List" }, { icon: @image-url("icons/grid.svg"), text: "Grid" } ]; current_item: 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_item
Section titled “current_item”int (in-out)
default: 0
The index of the currently selected item.
[SegmentedItem] default: a SegmentedItem with default values
An array of segmented items, each containing an icon and text.
Functions
Section titled “Functions”select(index: int)
Section titled “select(index: int)”Selects the item at the specified index.
SegmentedButton { clicked() => { self.select(1); }}
slint
© 2025 SixtyFPS GmbH