Skip to content
vviinn DocsDocs Beta

Discovery Slider and Set (vviinn-vpr-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.

Try the properties live in the Playground.

Set them as HTML attributes.

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

api-path

API endpoint URL (optional, defaults to production)

Type: string

block-subtitle

Widget's subtitle

Type: string

block-title

Widget's title

Type: string

campaign-type

Campaign type

Type: "VCS" | "VPR" · Default: this.mode === "set" ? "VCS" : "VPR"

campaigns

Comma-separated list of campaign IDs

Type: string · Default: ""

color

Accepts any hex color code

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

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

grid-arrows-dynamic

Hiding disabled arrows in the carousel if true

Type: boolean · Default: false

image-resolution-width

Resolution width of an image in the product card

Type: number · Default: DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH

image-width

Width of each recommended product image in Continuity mode

Type: number · Default: PRODUCT_CARD_IMAGE_WIDTH

locale

Locale for text localization

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

mode

Switch between carousel modes

Type: "continuity" | "grid" | "pure-grid" | "set" · Default: "continuity"

no-result-show

Showing a message (when true) or hiding the whole widget, when no results

Type: boolean · Default: true

no-result-text

A custom message is displayed when no results

Type: string · Default: ""

number-locale

Locale for number formatting. Falls back to locale

Type: string

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: false

product-details-redirect

Toggle for redirection to PDP on product's click

Type: boolean · Default: true

product-id

ID of product you need recommendations for (required)

Type: string

set-items-amount

Items amount in set mode grid

Type: number · Default: 4

set-mode-discounts

List of discounts for Set mode. Example: "5, 10, 15, 20" (could be less than 4 numbers)

Type: string · Default: this.mode === "set" ? "5, 10, 15" : ""

show-extended-filters

Show extended filters on top

Type: boolean · Default: false

show-filters

Show filters on top

Type: boolean · Default: false

show-multiple-images

Show multiple images on hover (desktop only)

Type: boolean · Default: false

show-scroll

Show or hide the widget's scrollbar

Type: boolean · Default: true

token

Vviinn customer's token (required)

Type: string

update-button-location

Location of Update button for Set mode

Type: "onItem" | "onTop" | "topAndItem" · Default: "topAndItem"

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

EventDescription
vviinnAddToBasketAdd to Basket button clicked
vviinnFiltersChangedThe filter's state changes
vviinnNoResultRecommendation request failed
vviinnProductClickClick on the product's link
vviinnProductLoadRecommended product renders on the page
vviinnProductViewRecommended product appears in the viewport
vviinnResultLoadThe recommendation result renders on the page
vviinnResultViewThe recommendation result appears in the viewport
vviinnWidgetLoadEvent emitted on widget load

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

SlotDescription
vviinn-basket-button-iconText of Add to Basket icon.
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-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-placeholder-iconIcon or content for the image placeholder.
vviinn-recommendations-subtitleRecommendations subtitle text.
vviinn-recommendations-titleRecommendations title text.
vviinn-update-button-iconIcon of Update Button (Set mode).
vviinn-update-button-textText of Update Button on the top (Set mode).

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

PartDescription
basket-buttonAdd to Basket button.
basket-button-containerProduct Card's basket button container.
brandBrand inside Product Card.
carousel-buttonBoth carousel navigation buttons (generic part).
carousel-button-nextThe next/forward carousel navigation button.
carousel-button-prevThe previous/back carousel navigation button.
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.
discount-labelDiscount label in Product Card (Set mode).
discount-percentageDiscount percentage inside the Add to Basket button (Set mode).
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.
image-placeholderPlaceholder shown when no image is available.
list-cardList card container.
list-card-content-containerList card's content container.
list-card-image-containerList card's image container.
list-labelList card's label (e.g., "Category").
list-titleList card's title.
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.
recommendations-resultsFor internal usage only!
recommendations-subtitleSubtitle of the recommendations grid.
recommendations-titleTitle of the recommendations grid.
titleTitle inside Product Card.
update-button-itemUpdate Button inside the Product Card (Set mode).
update-button-topUpdate Button on the top (Set mode).

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

PropertyDescription
--basket-button-bg-color-pressedThe background color of the pressed Basket Button.
--font-familyThe font family of the widget.
--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.
--sidebar-animation-durationThe animation duration of the recommendations sidebar.
--vviinn-carousel-columnsA number of items in grid mode.