Add a Variant property to your component for designers to choose from a predefined list of options.
Define the Variant prop in your Webflow code component with a name and list of options. Optionally, you can add a group, tooltip text, and a default value that matches one of the pre-defined options.
name: The name for the property.group: The group for this property. (optional)tooltip: The tooltip for the property. (optional)options: Array of available variant options.defaultValue: Default selected option. (optional)The Variant prop provides a string value representing the selected option to your React component.
n/a
Use a Variant prop when you want designers to: