# API

**Kind**: interface | **Module**: [Themes](https://docs.interop.io/desktop/reference/javascript/themes/index.md) | **Access**: `io.themes`

**Source**: https://docs.interop.io/desktop/reference/javascript/themes/api/index.html

Themes API.

## Methods

### getCurrent

Retrieves the current theme.

```ts
() => Promise<IOConnectDesktop.Themes.Theme>
```

**Returns**: `Promise<IOConnectDesktop.Themes.Theme>`

### list

Retrieves a list of the available themes.

```ts
() => Promise<IOConnectDesktop.Themes.Theme[]>
```

**Returns**: `Promise<IOConnectDesktop.Themes.Theme[]>`

### onChanged

Notifies when the theme is changed.

```ts
(callback: (theme: IOConnectDesktop.Themes.Theme) => any) => UnsubscribeFunction
```

**Parameters**

- **`callback`** (`(theme: IOConnectDesktop.Themes.Theme) => any`, required)
  Callback function for handling the event.

**Returns**: `UnsubscribeFunction`

### select

Selects a new theme.

```ts
(name: string) => Promise<void>
```

**Parameters**

- **`name`** (`string`, required)
  The name of the theme to select.

**Returns**: `Promise<void>`

## Related types

- [Theme](https://docs.interop.io/desktop/reference/javascript/themes/theme/index.md)
- [UnsubscribeFunction](https://docs.interop.io/desktop/reference/javascript/search/unsubscribefunction/index.md)
