Search.../

getDesignPreset( )

Gets the widget's current design preset.

Description

The getDesignPreset() function returns a Promise that resolves to the widget's current preset name. To use this function on an inner (nested) widget, use getNestedWidget().

Authorization

Request

This endpoint does not take any parameters

Response Object

Fulfilled - Current preset name.

Returns an empty object.

Status/Error Codes

Was this helpful?

Get a widget's design preset

Copy Code
1import wixWidget from 'wix-widget';
2
3// ...
4
5wixWidget.getDesignPreset()
6.then ((designPreset) => {
7 // Code to execute with the designPreset string
8})
9
10// For example, designPreset can be "preset-1-wide"