OnlineStoreDisplayStyle

Enum

The OnlineStoreDisplayStyle defines how measurement input is displayed to customers on the online store product page. Different display styles provide different user experiences for entering measurements.

Valid values

ValueDescription
numberFree-form number input field. Customers can enter any numeric value. Use this style when you want to apply purchase condition rules (min, max, increment). Requires the rules object to be configured.
pillsPre-defined preset buttons displayed as clickable "pills". Customers select from predefined measurement options. Requires the presets array to be configured.
dropdownDropdown menu with preset options. Customers select from a dropdown list of predefined measurements. Requires the presets array to be configured.
Type: This is a string enum type. The displayStyle field in the Variant object accepts one of these values.
Related: This enum is used in the settings.onlineStore.displayStyle field of the Variant object. When set to "number", see the OnlineStoreRules object for purchase condition configuration. When set to "pills" or "dropdown", configure the presets array instead.