New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-3dm-carousel

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-3dm-carousel

[![Actively Maintained](https://img.shields.io/badge/Maintenance%20Level-Actively%20Maintained-green.svg)](https://gist.github.com/cheerfulstoic/d107229326a01ff0f333a1d3476e068d)

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29
increased by61.11%
Maintainers
1
Weekly downloads
 
Created
Source

Actively Maintained

A true 3D Carousel component for images and slide show.

Carousel Example

Example

Edit react-3dm-carousel-basic-example

Installation and usage

Install it via npm:

npm i react-3dm-carousel

or yarn:

yarn add react-3dm-carousel

Then import the Carousel component like so :

import { Carousel } from 'react-3dm-carousel';

The only thing this component needs to run is an array of slides, which are objects with a unique key property and a content property containing an image instance :

import { Carousel } from "react-3dm-carousel";
const App = () => {
 return (
    <div className="">
      <Carousel />
    </div>
  );
}

Carousel with all the props

import { Carousel } from "react-3dm-carousel";
const App = () => {
 return (
    <div className="">
      <Carousel
        cardsData={data}
        setSelectedCardIdx={setSelectedCardIdx}
        rotation={true}
        rotationDuration={60}
        tilt={true}
        freeRoam={true}
        freeRoamLowerBounds={-180}
        freeRoamUpperBounds={0}
      />
    </div>
  );
}

And you're all set. You can also use props for better control of how the carousel looks and behaves:

Props

NameDefault valueDescription
cardsDatadummy dataAn array containing elements of the form [{ id: string; title: string; description: string; image: string; }] where key holds any unique value, title and description for the title and description and image url for the background image of the card.
rotationtrueOptional Enable or disable rotation of the carousel. Defaults to true (rotation is enabled).
rotationDuration60Optional time in seconds it takes to complete a full rotation. Only applicable when rotation is enabled. defaults to 60 seconds.
tilttrueOptional Cool tilt effect on Carousel relative to mouse position. defaults to true.
setSelectedCardIdxundefinedOptional React state setter to pass your setState to Carousel. defaults to undefined.
freeRoamfalseOptional Enables the user to freely rotate and move around the carousel canvas. defaults to false enabling this feature will cause the tilt to disable.
freeRoamUpperBoundsfalseOptional define the upper bounds of the free roam. make upper bounds to 360 and lower bounds to -360 to move in all directions.
freeRoamLowerBoundsfalseOptional define the upper bounds of the free roam. make upper bounds to 360 and lower bounds to -360 to move in all directions.

FAQs

Package last updated on 06 Jul 2023

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