
# Interface: IDesignEditorDefinitionSetTheme

Provides properties to define a product theme.

For details, you can refer to the [SetTheme command](https://customerscanvas.com/dev/editors/ui-framework/widgets/design-editor-commands/set-theme.html).
```
{
  "type": "design-editor",
  "name": "editor",
  "params": {
    "initial": { ... },
    "setTheme": {
      "primary": "{{ "#f00" }}",
      "secondary": "{{ "#0f0" }}"
    }
  }
}
```

## Hierarchy

* [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md)

  ↳ **IDesignEditorDefinitionSetTheme**

## Index

### Properties

* [after](idesigneditordefinitionsettheme.md#optional-after)
* [autoCompile](idesigneditordefinitionsettheme.md#optional-autocompile)
* [executeOnce](idesigneditordefinitionsettheme.md#optional-executeonce)
* [executeOnlyAfter](idesigneditordefinitionsettheme.md#optional-executeonlyafter)
* [lock](idesigneditordefinitionsettheme.md#optional-lock)
* [message](idesigneditordefinitionsettheme.md#optional-message)
* [onExecuted](idesigneditordefinitionsettheme.md#optional-onexecuted)
* [showPreloader](idesigneditordefinitionsettheme.md#optional-showpreloader)
* [theme](idesigneditordefinitionsettheme.md#theme)
* [timeout](idesigneditordefinitionsettheme.md#optional-timeout)

## Properties

### `Optional` after

• **after**? : *string | string[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[after](idesigneditorcommanddefinition.md#optional-after)*

The next commands to be executed after this command completes.

___

### `Optional` autoCompile

• **autoCompile**? : *boolean*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[autoCompile](idesigneditorcommanddefinition.md#optional-autocompile)*

If `false`, action will never execute automatically.

___

### `Optional` executeOnce

• **executeOnce**? : *boolean*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[executeOnce](idesigneditorcommanddefinition.md#optional-executeonce)*

If `true`, this command will be executed only once.
You can use it for `initial` command.
For example, we need to change surface depending on the option value.
We write for `initial` and for `updateSurfaces` the same productDefinition with $['option]._
And set `executeOnce = true` for `initial`. And initial will be executed only once.

___

### `Optional` executeOnlyAfter

• **executeOnlyAfter**? : *string[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[executeOnlyAfter](idesigneditorcommanddefinition.md#optional-executeonlyafter)*

Current command will be executed in a next update only after all commands executed in this param.
The same example from `executeOnce` param.
We need to execute `updateSurface` on all next updates, exclude the first one.
And we set `executeOnlyAfter = ['initial']` for `updateSurface` command.

___

### `Optional` lock

• **lock**? : *string[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[lock](idesigneditorcommanddefinition.md#optional-lock)*

Name of widgets that show preloader when command executed.

___

### `Optional` message

• **message**? : *string | string[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[message](idesigneditorcommanddefinition.md#optional-message)*

The message for preloader.

___

### `Optional` onExecuted

• **onExecuted**? : *Function | Function[]*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[onExecuted](idesigneditorcommanddefinition.md#optional-onexecuted)*

Functions that executed after command

___

### `Optional` showPreloader

• **showPreloader**? : *boolean*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[showPreloader](idesigneditorcommanddefinition.md#optional-showpreloader)*

If `true`, displays the preloader while executing this command.

___

###  theme

• **theme**: *string | IProductThemeConfig*

Typically, it is a theme name as a string, but you can also pass a [structure describing an "ad-hoc" theme](https://customerscanvas.com/dev/editors/iframe-api/howto/change-theme.html).

___

### `Optional` timeout

• **timeout**? : *number*

*Inherited from [IDesignEditorCommandDefinition](idesigneditorcommanddefinition.md).[timeout](idesigneditorcommanddefinition.md#optional-timeout)*

The timeout for switching preloader messages.
