Gallery

A carousel-style image gallery with previous/next navigation arrows, a slide counter, and a clickable thumbnail strip for quick navigation.

Preview

Zostel Manali - Common Area
Zostel Manali - Mountain View
Zostel Manali - Dorm Room
Zostel Manali - Bonfire

Usage

tsx
import { Gallery } from "zostel-ui";

<Gallery
  images={[
    { src: "/images/lobby.jpg", alt: "Lobby" },
    { src: "/images/dorm.jpg", alt: "Dorm Room" },
    { src: "/images/common.jpg", alt: "Common Area" },
    { src: "/images/view.jpg", alt: "Mountain View" },
  ]}
  showThumbnails
/>

Props

images
Type: { src: string; alt: string }[]
Default:

Array of image objects with src and alt text

showThumbnails
Type: boolean
Default: true

Whether to show the thumbnail strip below

autoPlay
Type: boolean
Default: false

Enable automatic slide advancement

interval
Type: number
Default: 5000

Auto-play interval in milliseconds

onSlideChange
Type: (index: number) => void
Default:

Callback when the active slide changes

className
Type: string
Default:

Additional CSS classes