Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

round-carousel-component

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

round-carousel-component

An infinitely scrollable 3D carousel component for the web

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
178
increased by7.88%
Maintainers
1
Weekly downloads
 
Created
Source

Github Build Codacy Badge Codebeat Badge CodeFactor Badge DeepScan grade Analytics

An infinitely scrollable 3D carousel component for the web

Demo

Visitor stats

GitHub stars GitHub forks GitHub watchers GitHub followers

Code stats

GitHub code size in bytes GitHub repo size GitHub language count GitHub top language GitHub last commit

Install

First install the component using your preferred package manager:

npm i round-carousel-component

# or

yarn add round-carousel-component

Usage

Then import the component in your application. Here is an example:

The slides (or items) should have the following shape:

PropTypeRequiredDescriptionExample
altstringfalseAlternative text for the slide image'This is an example alt text'
imagestringtruePath or URL to an image'https://source.unsplash.com/random/210x210'
contentstringtrueAn HTML string representing the content of the slide<div><strong>Slide Title</strong></div>
import { RoundCarousel, RoundCarouselItem } from 'round-carousel-component';

const node = document.getElementById('carousel');

// Create an array of Carousel Items
const items: RoundCarouselItem[] = Array(20)
	.fill('')
	.map((_, index) => ({
		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(node, {
	items
});

Options

The component accepts the following configuration options as props:

PropTypeRequiredDescriptionDefault
itemsRoundCarouselItemtrueAn array of RoundCarouselItems[]
itemWidthnumberfalseWidth of each of the carousel items210
nextButtonContentstringfalseContent of the next button'Next'
prevButtonContentstringfalseContent of the previous button'Previous'
showControlsbooleanfalseShow/hide navigation controlstrue

LICENSE

MIT


Connect with me:


Support and sponsor my work:

Keywords

FAQs

Package last updated on 23 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc