Get selected variant (Beta)
component.getSelectedVariant()
Retrieves the selected variant of a component.
If no variant is selected (that is, with the isSelected attribute set to true), the function returns the base variant of the specified component.
Similarly, if the currently selected component in the Designer is not a variant of the specified component, no variant of the specified component is selected, so the function returns the base variant of the specified component.
Beta
This feature is released as part of a Beta program and may change in future releases.
Syntax
Returns
Promise<Variant>
A promise that returns a variant.
Example
Designer Ability
Checks for authorization only