Skip to content

Properties

An element has a set of named properties, determined by the type of the element. A property holds a value.

A property declaration adds a property to the element in whose body it appears. It consists of the keyword property, the type in angle brackets, and a name, optionally preceded by a visibility modifier, optionally followed by : and an expression that binds to the property, and ends with ;.

export component Example inherits Window {
in property <color> tint;
in-out property <length> gap: 10px;
}
slint

The modifier declares the property’s visibility: which side may read and set the property’s value.

An in property is an input of the component: the application sets its value.

An out property is an output of the component: the component determines its value, and the application reads it.

An in-out property is both: the application sets and reads its value.

A private property is internal to the component: the application can neither set nor read it. Private is the default: a declaration without a modifier declares a private property.

Properties can be declared on any element.

Any property type can be declared.

Without a binding, the property has the default value of its type.

A change callback reacts to a property’s value changing, and a declaration with a two-way binding links the new property to an existing one.


© 2026 SixtyFPS GmbH