selectBackground()

Opens the editor's background picker for the selected component, letting a Wix user choose a background fill made up of a color, gradient, or image.

Syntax

Copy

Parameters

NameTypeDescription
initialValueobjectInitial background value to show when the picker opens.
onChangefunctionCalled with the updated background value as the Wix user interacts with the picker.

Returns

Promise<void>

Use the onChange callback to receive background values as the Wix user interacts with the picker, and apply them yourself with setStyles().

Example

Copy

See also

Last updated: 8 September 2026

Did this help?