Skip to main content

Function: useProductSlider()

useProductSlider(options): UseProductSliderReturn

Defined in: composables/react/useProductSlider.ts:103

useProductSlider — crossupsell / product fetch plus scroll tracking.

Parameters

options

UseProductSliderOptions

see UseProductSliderOptions.

Returns

UseProductSliderReturn

slider product state and fetch/scroll actions — see UseProductSliderReturn.

Remarks

GraphQL integration: services are built per-call via createServices(graphqlClient). fetchCrossupsells calls services.crossupsell.getCrossupsells() (CrossupsellService) with priceCalculateProductInput, then unwraps each Crossupsell's productTo / clusterTo target. fetchProducts calls services.product.getProducts() (ProductService) as a single batch query (never a per-id getProduct), with a status filter and filterAvailableAttributeInput. The scrollLeft / scrollRight / onScroll helpers are pure DOM operations and make no API calls.