Skip to content

ui hooks

The components already use these hooks. Reach for them when you build your own UI on the same data. Open a hook for its options and what it returns.

Other hooks

useCarouselThe rail's position, for a control rendered inside Carousel: the item nearest the start (activeIndex), how many there are, and scrollToIndex to bring one there.
import { useCarousel } from "@evolve-storefront/ui/carousel";
function useCarousel(): Pick<
CarouselContextValue,
"activeIndex" | "itemCount" | "scrollToIndex"
>

Returns Pick< CarouselContextValue, "activeIndex" | "itemCount" | "scrollToIndex" >