CheckBox
Use a CheckBox to let the user select or deselect values, for example in a list with multiple options. Consider using a Switch element instead if the action resembles more something that’s turned on or off.
Properties
text(in string): If set tofalsethe checkbox is disabled.enabled(in bool): If set tofalsethe checkbox is disabled.checked(in-out bool): Whether the checkbox is checked or not (default: false).style(in CheckBoxStyle): Defines the style of the checkbox.box_style(out BorderStyle): Gets the style of the check box.box_icon_style(out IconStyle): Gets the style of the check box icon.text_style(out TextStyle): Gets the style of the text of the checkbox.layout_style(out LayoutStyle): Gets the style of the layout.
Callbacks
toggled(/* checked */ bool): Thecheckedvalue changed.
Example
import { CheckBox } from "@vivi/magic.slint";
export component Example inherits Window {
width: 200px;
height: 25px;
CheckBox {
text: "Hello World";
}
}