React Image Turntable
Display a set of images as a draggable 360 degree turntable.
Features
- Accessible
- Responsive & fluid with intrinsic sizing
- Teeny Tiny
- Zero dependencies
- Type Safe
Install
npm i react-image-turntable
yarn add react-image-turntable
pnpm i react-image-turntable
Usage
Props
Props | Type | Required | Default Value | Description |
---|
images | string[] | ✓ | undefined | List of image src attributes. |
initialImageIndex | number | | 0 | Image index to start on at first render. |
Example
import React from 'react';
import { ReactImageTurntable } from 'react-image-turntable';
const images = [
'https://via.placeholder.com/1200x800?text=1',
'https://via.placeholder.com/1200x800?text=2',
'https://via.placeholder.com/1200x800?text=3',
];
export const Turntable = () => <ReactImageTurntable images={images} />;
Also see the example code in the repo.
Contributing
See the contributing guide to get started.
Notes