Platform
The Platform namespace contains properties that help deal with platform specific differences.
Properties
Section titled “Properties”This property holds the type of the operating system detected at run-time.
OperatingSystemType
This enum describes the detected operating system types.
android: This variant includes any version of Android running mobile phones, tablets, as well as embedded Android devices.ios: This variant covers iOS running on iPhones and iPads.macos: This variant covers macOS running on Apple’s Mac computers.linux: This variant covers any version of Linux, except Android.windows: This variant covers Microsoft Windows.other: This variant is reported when the operating system is none of the above.
is-app
Section titled “is-app”bool(out)
true when the user interface is driven by a host application — your business logic written
in Rust, C++, JavaScript or Python — and false when the .slint file is being interpreted on
its own, with nothing behind it, such as when previewed with slint-viewer or the editor’s preview.
Use it to provide placeholder data and preview-only decorations that are removed from your
compiled application. This property is a compile-time constant, so branches that depend on it
are optimized away when the value is known to be false or true.
style-name
Section titled “style-name”string(out)
The name of the currently selected widget style. Some widget
styles have dark and light variant suffixes, such as fluent-light. This property contains the
style name without the suffix. Use Palette‘s color-scheme to
determine the currently used scheme.
decimal-separator
Section titled “decimal-separator”string(out)
The decimal separator used when converting between float and string.
It defaults to the dot (.) and is determined by the locale.
See the translations guide for details.
Functions
Section titled “Functions”open-url(url: string) -> bool
Section titled “open-url(url: string) -> bool”Opens the specified URL in an external browser. This function invokes the platform’s URL opening mechanism.
Returns true on success, or false if the platform doesn’t support opening URLs or the operation failed.
import { Button } from "std-widgets.slint";
export component Example inherits Window { Button { text: "Open Slint Website"; clicked => { Platform.open-url("https://slint.dev"); } }}macos-bring-all-windows-to-front()
Section titled “macos-bring-all-windows-to-front()”Brings all application windows to the front of the screen.
On macOS this invokes [NSApp arrangeInFront:], which raises every application window
to the top of the window stack. On other platforms this function is a no-op.
This corresponds to the standard macOS Window › Bring All to Front menu item.
© 2026 SixtyFPS GmbH