Platform
Platform
The behaviours only the operating system owns.
The rule: take OS-owned behaviour from the OS; paint everything else.
What ships
| Surface | Entry | What the OS owns |
|---|---|---|
| Window | Window, SourceList, nativeWindowOptions | the traffic lights over the app's own sidebar and toolbar, and the blur behind them |
| Appearance | watchAppearance, appearanceOverrides | the accent colour, Light/Dark and Reduce Transparency, read from defaults |
| Window verbs | useWindowActions | minimise, zoom, fullscreen, rename, activate |
| Path picker | window.pickPaths | the system's open panel, and its cancel |
The window opts in with nativeWindowOptions, which sets titlebarTransparent,
trafficLightX / trafficLightY and the theme's windowBackground on macOS,
and nothing elsewhere:
render(<App />, { title: "Files", ...nativeWindowOptions(theme, currentPlatform) });What stays painted
- The OS menu bar has no API, so
AppMenudraws it in-window (/shell/app-menu). - Alerts, sheets and popovers are the library's floating layers, not
NSAlertorNSPopover. - No native colour panel or tooltip;
Tooltipis painted.
Edit this page on GitHubapps/docs/content/docs/platform/index.mdx