Socket
Socket
Sign inDemoInstall

3d-carousel-component

Package Overview
Dependencies
6
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    3d-carousel-component

A classy 3d carousel for react.js


Version published
Maintainers
1
Install size
15.1 kB
Created

Readme

Source

Image

  • This is a classy 3d carousel for react.js;✨💞

Table of Contents

  • Getting Started🚀
  • Customization🔥
  • Examples👾
  • Issues??🐛
  • Special Mention💕

Getting Started🚀

npm i 3d-carousel-component

import Carousel3D from "3d-carousel-component";

const YourComponent = () => {
  return (
    <Carousel3D
      ContainerStyle={ContainerStyle}
      CardStyle={CardStyle}
      CardList={CardList}
    />
  );
};

Customization🔥

  • Basically you have to pass three props, Namely:

    • ContainerStyle
    • CardStyle - CardList
    • CardList
  • Out of this first two are for styling and last one contains list of your cards.

  • Note all variables, props, properties follow UpperCamelCase Rule.*

    ContainerStyle

    • It allows you to style the main outer container of carousel.
    • Following properties are available:
    KeyFunction
    WidthWidth of the main container
    HeightHeight of the main container
    PaddingPadding of the main container
    MarginMargin of the main container
    BackgroundColorBackground color of the main container
    BackgroundBackground property
    • Look at the example below for more understanding.

    CardStyle

    • It allows you to style each card of the carousel.
    • Following properties are available:
    KeyFunction
    WidthWidth of each Card
    HeightHeight of each Card
    PaddingPadding inside of your Card
    AspectRatioDefines Aspect ratio of your Card
    • Look at the example below for more understanding.

    CardList

    • It bassically an array of objects with "element" key containing content of your card. (Can be anyting you wish to have 😉)

Examples👾

import Carousel3D from  "3d-carousel-component"

const YourComponent  =  ()  =>  {
	//List of element you want inside carousel.
	const  CardList  = [
		{ element:  <div>Card 1</div>, },
		{ element:  <div>Card 2</div>, },
		{ element:  <div>Card 3</div>, },
		{ element:  <div>Card 4</div>, },
		{ element:  <div>Card 5</div>, },
		{ element:  <div>Card 6</div>, },
		{ element:  <div>Card 7</div>, },
		{ element:  <div>Card 8</div>, },
	];
	const ContainerStyle = {
		BackgroundColor:  "Cyan",
		Width:  "100%",
		Padding:  "1em",
		Margin:  "auto",
	};
	const constCardStyle = {
		Width:  "100%",
		BackgroundColor: "blanchedalmond",
		Padding:  "0.5em 1em",
	};

	return  <Carousel3D
			ContainerStyle={ContainerStyle}
			CardStyle={CardStyle}
			CardList={CardList}/>;
};

export defalut YourComponent;

Issues??🐛

  • Having any issues or found any bugs free fell to reach us on github.📧

Special Mention💕

FAQs

Last updated on 11 Feb 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc