The product details page (PDP) drop-in component has a single container called ProductDetails. The container’s configuration options are provided below.
Configuration options
The product details page provides the following configuration options:
Option
Type
Req?
Description
sku
string
Yes
The unique identifier for the product.
hideSku
boolean
No
Optional boolean to hide the SKU display.
hideQuantity
boolean
No
Hides the quantity selector if set to true.
hideSelectedOptionValue
boolean
No
Hides the selected values of the option.
hideShortDescription
boolean
No
Hides the short description if set to true.
hideDescription
boolean
No
Hides the description if set to true.
hideAttributes
boolean
No
Hides the attributes if set to true.
hideURLParams
boolean
No
Disables synchronization of options with URL parameters if true.
productData
ProductModel
No
Optional initial product data to preload the component.
slots
object
No
An object containing slot overrides for customizing various parts of the component display.
carousel
CarouselConfig
No
Configuration for the product image carousel display.
onAddToCart
function
No
Callback function triggered upon adding the product to the cart.
zoomType
string
No
Specifies the type of zoom functionality for a product image. Options: "zoom" or "overlay".
closeButton
boolean
No
Indicates whether a close button should be displayed.
SKU
The sku property is the only required configuration. It’s a string that uniquely identifies the product. This value is used to fetch ProductModel data from the backend.
Hide options
The hide options (hideSku, hideQuantity, and the others) let you hide the parts of the product details UI that are not relevant for your storefront. These properties are optional and default to false.
Product Data
The productData property is an optional object that contains the initial product data to preload the component. The object should follow the ProductModel interface:
Slots allow for the customization of component parts. Each slot accepts a SlotProps object with a context containing data, values, and a valid state. Custom actions and content can be added through these slots. Visit the Slots page for slot details and usage information.
Carousel
The Carousel settings available for configuration are defined in the CarouselConfig interface:
Option
Type
Req?
Description
controls
string
No
Layout options: thumbnailsRow, thumbnailsColumn, or dots.
arrowOnMainImage
boolean
No
Whether to display the carousel arrows on the main image.
loopable
boolean
No
Whether the carousel should loop continously or stop at the end.
peak
object
No
Whether to show part of the next image on mobile and desktop.
gap
string
No
The space between the image and the next one.
thumbnailsLoadingMode
string
No
The loading mode for the thumbnails: lazy or eager.
imageParams
object
No
Can be used to set the width, height, auto, quality, crop, and fit properties of carousel images.
thumbnailParams
object
No
Can be used to the set width, height, auto, quality, crop, and fit properties of the carousel thumbnails.
Triggered when the Add to Cart button is clicked. Receives an object with sku, quantity, and optionally optionsUIDs reflecting the user’s selection.
zoomType
This property can take one of two string values: zoom or overlay. It is used to enhance product image viewing by providing zoom or overlay functionality:
overlay (default): Provides a larger, distraction-free view of a product image. The clicked image is opened in full screen.
zoom: Provides a close-up view of the product’s image in the gallery. The clicked image is not opened in full screen.
closeButton
This property is a boolean that can only be used in combination with the zoomType property. The default value is false. If true, the close button is shown; if false or not provided, the close button is not shown.
Example configuration
The following example demonstrates how to configure the product details container: