Slider Components Documentation

A set of content hero sliders for OTT/media applications. Each slider serves a different use case and design pattern.

Installation

Use shadcn CLI to add slider components. All sliders expect IContentData[] from @zezosoft/zezo-ott-api-client. Run the command for the slider you need:

pnpm dlx shadcn@latest add https://zezo-ui.vercel.app/r/zezo-slider.json

Overview

SliderUse CaseKey Features
SliderBasic hero carouselImage-only, framer-motion, drag support, Watch Now CTA
SliderV1Full-featured homepage heroTrailer auto-play, thumbnail strip, responsive (desktop + mobile)
SliderV2Featured content showcaseMulti-card layout, trailer video, theme colors, intersection observer
SliderV3Rich hero with actionsNative video trailer, FavoriteButton, dual CTAs, dot indicators
MainHomeTabAndMobileSliderMobile-only carouselSwiper-based, used inside V1/V3 on small screens
1. Slider (Basic)
Simple hero carousel with minimal UI. Best for image-only content without trailers.

Installation

pnpm dlx shadcn@latest add https://zezo-ui.vercel.app/r/zezo-slider.json

Props

PropTypeRequiredDescription
dataIContentData[]YesContent items to display
onWatchNow(item) => voidNoCallback when user clicks "Watch Now"

Usage

import Slider from "@/components/ui/zezo-ui/slider/Slider";

<Slider
  data={contentData}
  onWatchNow={(item) => router.push(`/details/${item.type}/${item.slug}`)}
/>
2. SliderV1
Full-featured homepage hero. Desktop: full hero with thumbnails; Mobile: MainHomeTabAndMobileSlider.

Installation

pnpm dlx shadcn@latest add https://zezo-ui.vercel.app/r/zezo-slider-v1.json

Props

PropTypeDefaultDescription
dataIContentData[][]Content items
forceDesktopForPreviewbooleanfalseAlways show desktop layout (useful for docs)

Usage

import SliderV1 from "@/components/ui/zezo-ui/slider/SliderV1";

<SliderV1 data={featuredContent} />

// For docs/preview - force desktop layout:
<SliderV1 data={featuredContent} forceDesktopForPreview />
3. SliderV2
Featured content row with side-by-side cards. Pauses when off-screen (intersection observer).

Installation

pnpm dlx shadcn@latest add https://zezo-ui.vercel.app/r/zezo-slider-v2.json

Props

PropTypeRequiredDescription
dataIContentData[]YesContent items
onWatchNow(item) => voidNoCallback when user clicks "Watch Now"

Usage

import SliderV2 from "@/components/ui/zezo-ui/slider/SliderV2";

<SliderV2
  data={featuredContent}
  onWatchNow={(item) => handleWatch(item)}
/>
4. SliderV3
Rich hero with FavoriteButton, dual CTAs (Watch Now + More details), and dot indicators.

Installation

pnpm dlx shadcn@latest add https://zezo-ui.vercel.app/r/zezo-slider-v3.json

Props

PropTypeDefaultDescription
dataIContentData[][]Content items
sessionIWhoami | null-User session (for FavoriteButton)
forceDesktopForPreviewbooleanfalseForce desktop layout for docs

Usage

import SliderV3 from "@/components/ui/zezo-ui/slider/SliderV3";

<SliderV3 data={featuredContent} session={userSession} />
5. MainHomeTabAndMobileSlider
Mobile-only Swiper-based carousel. Used internally by SliderV1 and SliderV3.

Installation

pnpm dlx shadcn@latest add https://zezo-ui.vercel.app/r/zezo-mobile-slider.json

Props

PropTypeDescription
dataIContentData[] | nullContent items

Usage

import MainHomeTabAndMobileSlider from "@/components/ui/zezo-ui/slider/MainHomeTabAndMobileSlider";

<MainHomeTabAndMobileSlider data={contentData} />

Quick Comparison

FeatureSliderSliderV1SliderV2SliderV3
Trailer supportNoYes (VideoPlayer)Yes (VideoPlayer)Yes (native video)
Mobile variantSameMainHomeTabAndMobileSliderSameMainHomeTabAndMobileSlider
Thumbnail stripNoYesNoNo
FavoriteButtonNoNoNoYes
Drag/swipeYesNoNoNo
Height60vh100vh - header60vh80vh