Skip to content

Search the guides, deployment pages, and API reference.

ThemeMode

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

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

Type Parameters

T

T

Properties

media?

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?

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

tokens: DeepPartialTokens<T>;

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