Skip to content
vviinn DocsDocs Beta

Search Modal Window (vviinn-vps-widget)

Generated from vviinn-widgets 2.228.0, the latest release when these docs were built. If you pin an older version, some of these may not be in it yet — check the Changelog.

Set them as HTML attributes.

active

Toggle the widget's modal showing

Type: boolean · Default: true

add-price-container

Wrap the Product Card's price values in the container.

Type: boolean · Default: false

add-to-basket-show

Show or hide Add to Basket buttons

Type: boolean · Default: false

ai-suggestions-show

Show the AI Suggestions block in search results

Type: boolean · Default: false

api-path

API endpoint URL (optional, defaults to production)

Type: string

auto-suggest-show

Show auto-suggest dropdown with search completions

Type: boolean · Default: true

campaign-id

Campaign ID used for Visual Search (deprecated)

Type: string · Default: ""

Campaign ID used for Text Search

Type: string · Default: ""

Campaign ID used for Visual Search

Type: string · Default: ""

css-url

URL to external CSS file for custom styling

Type: string · Default: null

currency-sign

The currency sign is displayed after the price

Type: string

example-image-source

Example image source

Type: string · Default: DEFAULT_EXAMPLE_IMAGE

excluded

Excluded filter. Example: "brand:Nike,Vans;custom_label_0:summer"

Type: string · Default: ""

favorite-show

Show or hide Favorite button

Type: boolean · Default: false

image-resolution-width

Resolution width of an image in the product card

Type: number · Default: SEARCH_WIDGET_IMAGE_RESOLUTION_WIDTH

locale

Locale for text localization

Type: "de-DE" | "en-US"

number-locale

Locale for number formatting. Falls back to locale

Type: string

one-click-discovery-campaigns

Comma-separated list of campaign IDs

Type: string · Default: ""

one-click-discovery-mode

One-Click Discovery mode, restricted to append only (no modal supported for this component)

Type: "append-grid" | "append-slider" | "unset" · Default: "append-grid"

price-prefix

Prefix is displayed before the price

Type: string

product-details-new-tab

Toggle for opening product link in new tab or not

Type: boolean · Default: true

product-details-redirect

Toggle for redirection to PDP on product's click

Type: boolean · Default: true

results-page-params

Custom URL param names for results page redirect. Default: "query=query&searchId=searchId".

Type: string

results-page-url

URL of the results page for automatic search redirect.

Type: string

show-interval-inputs

Show editable input fields in interval filters instead of readonly labels

Type: boolean · Default: false

show-multiple-images

Show multiple images: swiper on mobile, hover on desktop in product cards

Type: boolean · Default: false

show-results-in-modal

Render results in modal. Set false to redirect or show results on the page.

Type: boolean · Default: true

text-search-show

Show the text search

Type: boolean · Default: false

token

Vviinn customer's token (required)

Type: string

use-drag-and-drop

Accept image files dropped from the OS onto the upload button (desktop only)

Type: boolean · Default: false

Listen with document.addEventListener(). The pages under Events describe the data each event carries.

EventDescription
vviinnImageCropCrop area changes
vviinnImageUploadStartedThe image upload has started
vviinnNoResultWrong image format (supported formats depend on the browser), or the request failed
vviinnRedirectRedirect to results page (can be intercepted by client via preventDefault)
vviinnSelectObjectUser selects the detected object
vviinnWidgetCloseEvent emitted on modal close
vviinnWidgetLoadEvent emitted on widget load
vviinnWidgetOpenEvent emitted on modal open

Replace texts and icons with your own content: Replace Widget Content.

SlotDescription
vviinn-basket-button-iconIcon of Add to Basket button.
vviinn-basket-button-icon-pressedIcon of pressed Add to Basket button.
vviinn-basket-button-textText of Add to Basket button.
vviinn-basket-button-text-pressedText of pressed Add to Basket button.
vviinn-camera-button-text-startTitle of Start Camera button.
vviinn-camera-button-text-stopTitle of Stop Camera button (for Desktop).
vviinn-camera-capture-textText above the Camera Capture button.
vviinn-camera-iconIcon of Camera Button.
vviinn-custom-label-0Custom label with index 0.
vviinn-custom-label-1Custom label with index 1.
vviinn-custom-label-2Custom label with index 2.
vviinn-custom-label-3Custom label with index 3.
vviinn-custom-label-4Custom label with index 4.
vviinn-energy-label-data-sheet-textText of the data sheet link for the energy label.
vviinn-favorite-iconIcon of Favorite button.
vviinn-favorite-icon-pressedIcon of pressed Favorite button.
vviinn-image-search-modal-titleImage search modal title.
vviinn-image-upload-button-textTitle of Upload Button.
vviinn-image-upload-iconIcon of Upload Button.
vviinn-privacy-badge-textText content of privacy notification block.
vviinn-results-vpr-iconOne-Click Discovery icon.
vviinn-teaser-textText on the widget's main screen.
vviinn-text-search-iconIcon of the text search block.

Style these elements with vviinn-vps-widget::part(name): Styling Specific Elements.

PartDescription
basket-buttonAdd to Basket button.
basket-button-containerProduct Card's basket button container.
brandBrand inside Product Card.
close-buttonClose Button in the modal's header.
content-containerProduct Card's content container.
currencyCurrency related to price.
custom-label-0Custom label with index 0.
custom-label-1Custom label with index 1.
custom-label-2Custom label with index 2.
custom-label-3Custom label with index 3.
custom-label-4Custom label with index 4.
deeplinkAnchor element around product title. Rendered only if "deeplink" property is filled.
energy-label-containerEnergy label container.
energy-label-data-sheet-linkData sheet link.
energy-label-iconIcon with an energy class.
energy-label-product-typeProduct type.
favorite-buttonFavorite button.
imageProduct Card image.
image-containerProduct Card's image container.
image-linkAnchor element around product image. Rendered only if "deeplink" property is filled.
image-picturePicture element for image.
price-amount-base-outdatedNumeric part of the base price.
price-amount-base-regularNumeric part of the base price.
price-amount-base-saleNumeric part of the base price.
price-amount-outdatedNumeric part of the price.
price-amount-regularNumeric part of the price.
price-amount-saleNumeric part of the price.
price-outdatedBlock for outdated price. Rendered when the product contains the sale price.
price-prefixBlock rendered before each price element (for ex. "from").
price-regularBlock for a price if no sale price is presented.
price-saleBlock for sale price. Rendered only if the sale price is presented.
product-cardProduct Card itself.
product-card-actionsProduct Card actions wrapper.
product-card-actions-topProduct Card top actions wrapper.
product-images-paginationContainer for product images pagination dots (mobile only).
product-images-pagination-bulletIndividual pagination dot.
product-images-pagination-bullet-activeActive pagination dot.
product-typeProduct Type inside Product Card.
productsProducts container.
results-titleTitle on the results page.
secondary-actionBack Button in the modal's header.
start-camera_buttonStart Camera Button.
text-search-inputText search input.
titleTitle inside Product Card.
upload-photo_buttonUpload Photo Button.

Set them on vviinn-vps-widget or a parent element: CSS Variables.

PropertyDescription
--basket-button-bg-color-pressedThe background color of the pressed Basket Button.
--color-primaryThe color of Search Button and bullets in Onboarding Block.
--color-primary-hoverThe color of Search Button and bullets in Onboarding Block on mouse hover.
--font-familyThe font family of the widget.
--modal-border-radiusThe border radius of the modal.
--product-card-content-alignThe alignment of the content inside the product card's flex container.
--product-card-image-aspect-ratioThe aspect ratio of the product card image (e.g., "1 / 1", "3 / 4").
--product-card-image-bg-colorThe background color of the product card image.
--product-card-image-borderThe border of the product card image.
--product-card-text-alignThe alignment of the text inside the product card.
--product-card-widthMinimum width of product card inside the grid.
--search-modal-animation-durationThe animation duration of the modal on desktop devices.
--search-modal-animation-duration-mobileThe animation duration of the modal on mobile devices.