getPresetDefinitions()

Retrieves the presets declared in the selected component's manifest. A preset is a named, predefined visual variation of the component, such as "Card" or "Minimal", each with its own display name, thumbnail, and default styles and data.

Syntax

Copy

Returns

Promise<ElementPresetDefinitions>

An object mapping each preset's key to its definition. Each definition can include:

PropertyTypeDescription
displayNamestringThe label for the preset in the Explore Designs auto panel.
thumbnailUrlstringURL of the preset's preview thumbnail.
initialSizeobjectThe preset's declared width and height settings. Each is a sizingType of 'content', 'stretched', or 'pixels', with a pixels value present only when sizingType is 'pixels'.

Example

Copy

See also

Last updated: 8 September 2026

Did this help?