---
title: Platform
description: Platform Namespace
---

import SlintProperty from '@slint/common-files/src/components/SlintProperty.astro';
import Link from '@slint/common-files/src/components/Link.astro';

The **Platform** namespace contains properties that help deal with platform specific differences.

## Properties

### os
<SlintProperty propName="os" typeName="enum" enumName="OperatingSystemType" defaultValue="known at runtime">

This property holds the type of the operating system detected at run-time.

:::note{Note}
When running in a web browser, the value of this property is computed at run-time by querying the web browser's navigator properties.
:::

:::note{Note}
When Slint is ported to new operating systems in the future, new enum values will be added.
:::

</SlintProperty>


### style-name
<SlintProperty propName="style-name" typeName="string" defaultValue="known at runtime">
The name of the currently selected <Link type="StyleWidgets" label="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 <Link type="Palette" label="Palette"/>'s `color-scheme` to
determine the currently used scheme.
</SlintProperty>
