# UseTheme

What [`useTheme`](https://docs.mapcairn.com/api/map/useTheme-function.md) returns.

This is an interface exported by `@mapcairn/map`, checked against version 0.2.0.

## Signature

```ts
import type { UseTheme } from "@mapcairn/map";
 
interface UseTheme
```

## Properties

### choice

```ts
readonly choice: ThemeChoice;
```

What the user chose: system, light or dark.

### resolved

```ts
readonly resolved: ResolvedTheme;
```

What is actually shown.

### setChoice

```ts
readonly setChoice: (choice: ThemeChoice) => void;
```

Stores the person's choice of system, light or dark. It takes effect at once.

## See also

- [`ThemeChoice`](https://docs.mapcairn.com/api/core/ThemeChoice.md)
- [`ResolvedTheme`](https://docs.mapcairn.com/api/core/ResolvedTheme.md)

Source: [packages/map/src/services/hooks.ts:261](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/services/hooks.ts#L261)
