Skip to content

Exports

Export statements may appear at the top level of a .slint source file, interleaved with component definitions.

Names defined in a .slint source file are private to that file by default. A name is visible to importers only if it is explicitly exported.

An export statement has one of the following forms:

export component Name { /* ... */ }
export { Name, ... }
slint

The form export component Name { ... } defines a component and exports it in a single statement. The exported name is the component’s own name.

The form export { Name, ... } exports one or more names already defined in the current file. A trailing comma is permitted.

An export list item is either a bare identifier Name or a renaming of the form Name as Other. A renaming exports the locally-defined Name under the external name Other. The local name Name remains defined in the current file.

Each identifier on the left of as, and each bare identifier, shall refer to a name defined in the current file.

A source file shall not export the same external name more than once. This includes the combination of any declaration-site export and any export-list entry.


© 2026 SixtyFPS GmbH