Skip to main content

Visual Discovery Configuration Options

Configure the Visual Discovery widget by setting options on window.__fast_options before the widget loads.

Configuration Structure

Options are set globally on the window object and merged into the widget configuration:

window.__fast_options = {
// Button customization
discovery_button_text: "Find Similar",
similar_styles_button_text: "Shop Similar",
similar_styles_button_color: "#000000",
visual_discovery_button_color: "#000000",

// Swatch configuration
display_swatches_feature: true,
hide_oos_swatches: true,
color_attribute_names: ["Color", "colour"],
swatch_width: 32,
swatch_visibility_threshold: 0,

// Mobile features
display_add_to_cart_mobile: false,

// Filter customization
visualAttributesFilter: ["Color group", "Brand"],
visualVariantsFiltersExcluded: ["Color"]
};

Available Options

Button Customization

OptionTypeDefaultDescription
discovery_button_textstring-Text displayed on the Visual Discovery button
similar_styles_button_textstring"Shop Similar"Text displayed on the Similar Styles button
similar_styles_button_colorstring"black"Color of the Similar Styles button (hex, rgb, or CSS color name)
visual_discovery_button_colorstring"black"Color of the Visual Discovery button (hex, rgb, or CSS color name)

Swatch Options

OptionTypeDefaultDescription
display_swatches_featurebooleanfalseEnable/disable color swatches on product cards
hide_oos_swatchesbooleanfalseHide out-of-stock color variants from swatches
color_attribute_namesstring[]["Color"]Custom color attribute names to recognize (e.g., ["Color", "colour", "Couleur"])
swatch_widthnumber-Width of swatch elements in pixels
swatch_visibility_thresholdnumber0Minimum number of colors required to show swatches (0 = always show if feature enabled)

Mobile Features

OptionTypeDefaultDescription
display_add_to_cart_mobilebooleanfalseShow Add to Cart button on mobile devices

Filter Options

OptionTypeDefaultDescription
visualAttributesFilterstring[][]Product attribute names to use as filters (e.g., ["Color group", "Brand", "Material"]) - these are product-level attributes, not variant attributes
visualVariantsFiltersExcludedstring[][]Variant filter names to exclude from display (e.g., ["Color", "Size"]) - useful when replacing with attribute filters