# Appearance & Theming

`OnsideAppearance` sets global styling for every screen OnsideKit presents. Access the shared instance via `Onside.appearance()`.

## Set the global theme

```swift
@MainActor func setThemeMode(_ themeMode: OnsideUIThemeMode?)
```

```swift
Onside.appearance().setThemeMode(.dark)
```

`OnsideUIThemeMode`:

* `.auto` — follow the user's system appearance (Light/Dark)
* `.light` — force light
* `.dark` — force dark
* `nil` — reset the theme setting (does not affect already-presented UI)

The best place to set this is at launch:

```swift
func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
    Onside.initialize()
    Onside.appearance().setThemeMode(.dark)   // force dark for all OnsideKit screens
    return true
}
```

## Theme resolution

When OnsideKit presents a screen, the theme is resolved in this order:

1. A per-screen override from [`OnsideDelegate.onside(uiThemeOverrideForScreen:)`](/sdk/customization/delegate.md#per-screen-theme-override), if provided.
2. The global theme set here via `setThemeMode(_:)`.
3. The system appearance.

{% hint style="info" %}
Theme mode is currently the only globally configurable appearance setting.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onside.io/sdk/customization/appearance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
