See code on Github

Round Carousel Component

Install


npm install round-carousel-component

# or

yarn add round-carousel-component
			

Use the module



import { RoundCarousel, RoundCarouselItem } from 'round-carousel-component';

// Create an array of RoundCarousel items
const items: RoundCarouselItem[] = Array(20)
  .fill('')
  .map((_: string, index: number) => ({
	alt: 'A random Unsplash photo',
	image: `https://picsum.photos/${210 + index}`,
	content: `<div><strong>Round Carousel</strong><span>Slide number ${index + 1}</span></div>`
  }));

new RoundCarousel(document.getElementById('carousel'), {
	items
});