Socket
Socket
Sign inDemoInstall

3d-react-carousal

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

3d-react-carousal

3D carousel in react


Version published
Weekly downloads
401
decreased by-38.87%
Maintainers
1
Weekly downloads
 
Created
Source

3D carousel component in react (with swipe support).

Demo

Demo

jsfiddle (https://jsfiddle.net/suhailsulu/8hnqaz2c/)

Installation

npm
 npm i 3d-react-carousal
yarn
 yarn add 3d-react-carousal
Add fa-css in public.html for arrows
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
Importing the component
import {Carousel} from '3d-react-carousal';
.
.
.
let slides = [
    <img  src="https://picsum.photos/800/300/?random" alt="1" />,
    <img  src="https://picsum.photos/800/301/?random" alt="2" />  ,
    <img  src="https://picsum.photos/800/302/?random" alt="3" />  ,
    <img  src="https://picsum.photos/800/303/?random" alt="4" />  ,
    <img src="https://picsum.photos/800/304/?random" alt="5" />   ];
.
.
.
.
const callback = function(index){
    console.log("callback",index);
}
.
.
<Carousel slides={slides} autoplay={true} interval={1000} onSlideChange={callback}/>

props

slides :- Array of react components
autoplay :- Boolean (true or false) - optional
interval :- number (time in milliseconds) - optional
arrows :- Boolean (true or false) - optional
onSlideChange :- callback function with index of the slide as argument - optional
You can give any component in the slides like images, divs or even your custom components

Keywords

FAQs

Package last updated on 12 Mar 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc