---
title: "ThemeMode"
description: "A theme's mode: a condition plus the values it overrides."
url: "https://pitlane.tools/package/theme/interface/ThemeMode"
---

# ThemeMode

```ts
import type { ThemeMode } from "@pitlane/theme";
```

A theme's mode: a condition plus the values it overrides.

## Type Parameters

### T

`T`

## Properties

### media?

```ts
optional media?: string;
```

The media query this mode applies under. Defaults to `(prefers-color-scheme: <name>)` for the names `light` and `dark`, and is required for any other name.

---

### selector?

```ts
optional selector?: string;
```

A selector this mode also applies under, for a user-selectable toggle. An attribute selector outranks the media block on specificity, so an explicit choice beats the OS preference.

---

### tokens

```ts
tokens: DeepPartialTokens<T>;
```

The values this mode overrides. Structure only, never types.
