---
url: /api/formats/scope/src/interfaces/CreateScopeOptions.md
---
[pantoken-root](../../../../index.md) / [formats/scope/src](../index.md) / CreateScopeOptions

# Interface: CreateScopeOptions

Beta

Options for [createScope](../functions/createScope.md).

## Extends

* [`ScopeConfig`](ScopeConfig.md)

## Properties

### theme?

> `optional` **theme?**: `string`

Beta

Theme key, e.g. `"rebrand"`. Matched by `[data-pantoken-theme="…"]`.

#### Inherited from

[`ScopeConfig`](ScopeConfig.md).[`theme`](ScopeConfig.md#theme)

***

### scheme?

> `optional` **scheme?**: [`Scheme`](../type-aliases/Scheme.md)

Beta

Pinned color scheme. Omit to follow the OS preference.

#### Inherited from

[`ScopeConfig`](ScopeConfig.md).[`scheme`](ScopeConfig.md#scheme)

***

### color?

> `optional` **color?**: `string`

Beta

Custom brand color key.

#### Inherited from

[`ScopeConfig`](ScopeConfig.md).[`color`](ScopeConfig.md#color)

***

### instanceId?

> `optional` **instanceId?**: `string`

Beta

Identifier distinguishing this pantoken instance from others on the page. Scopes, storage keys,
and frame messages are all keyed by it.

#### Overrides

[`ScopeConfig`](ScopeConfig.md).[`instanceId`](ScopeConfig.md#instanceid)

***

### boundary?

> `optional` **boundary?**: `boolean`

Beta

Stop ancestor resolution at this element, so nothing outside can theme what is inside. Use for
a preview pane that must not inherit the surrounding app's theme.

***

### persist?

> `optional` **persist?**: `boolean`

Beta

Persist and restore state. Pass `false` to keep the scope in-memory only (default `true`).

***

### storage?

> `optional` **storage?**: `Pick`<`Storage`, `"getItem"` | `"setItem"`> | `null`

Beta

Storage backend (default `localStorage`, silently skipped when unavailable).
