UIR

DrumGallery

A large photo with an endless thumbnail strip that bends around a 3D drum. Tap a thumbnail to centre it and show it large.

Preview

Installation

npx @codewithrabby/ui@latest add drum-gallery

Usage

import { DrumGallery } from "@/components/uir/drum-gallery";

<View style={{ flex: 1 }}>
  <DrumGallery
    images={photos}
    stepDeg={30}
    onChange={(index) => console.log(index)}
  />
</View>

Props

PropTypeDefault
images

Photos to show. The strip loops them endlessly.

ImageSource[]—
thumbSize

Thumbnail size.

number75
gap

Space between thumbnails.

number14
stepDeg

Angle between neighbours on the drum. Higher = tighter curve.

number30
depth

Camera distance. Lower = stronger 3D.

number500
curve

Which way the thumbnails face.

1 | -11
showPreview

Show the large photo above the strip.

booleantrue
onChange

Called with the tapped image's index.

(index: number) => void—