Source Files
File Extension
Section titled “File Extension”Slint source files use the file extension .slint.
Encoding
Section titled “Encoding”A .slint source file shall be encoded as UTF-8.
A UTF-8 byte order mark (U+FEFF) may appear at the start of the file and is ignored.
Line Terminators
Section titled “Line Terminators”The compiler recognizes the character U+000A (LINE FEED) and the two-character sequence U+000D U+000A (CARRIAGE RETURN, LINE FEED) as equivalent line terminators.
A U+000D (CARRIAGE RETURN) that is not immediately followed by U+000A is not a line terminator.
Source files should not contain bare carriage returns.
Whitespace
Section titled “Whitespace”The whitespace characters are U+0020 (SPACE), U+0009 (CHARACTER TABULATION), and the line terminators defined in Line Terminators.
Whitespace separates tokens but is otherwise insignificant; any sequence of one or more whitespace characters is equivalent to a single space.
Comments
Section titled “Comments”A line comment begins with two consecutive solidus characters // and extends to the next line terminator.
A block comment is delimited by /* and */.
Block comments nest: an inner /* inside a block comment increments the nesting depth, and the comment terminates only when a matching */ returns the nesting depth to zero.
Comments are equivalent to whitespace; they have no other semantic effect.
The token sequences /// and /** are recognized as ordinary line and block comments, respectively, and carry no special meaning.
// A line comment.
/* A block comment that spans multiple lines. */
/* Block comments /* may be nested */ like this. */© 2026 SixtyFPS GmbH