🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

react-carousel3

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-carousel3

react 3d 轮播

1.0.0
latest
Source
npm
Version published
Weekly downloads
45
2.27%
Maintainers
1
Weekly downloads
 
Created
Source

react-carousel3d

A 3D perspective carousel。预览地址:https://xiaxiangfeng.github.io/react-carousel3d/#/carousel

Image text

从 NPM 下载包

npm i react-carousel3d

Basic usage

Demo:

import React from 'react';
import { Carousel } from 'react-carousel3d';

const style = {
  width: 297,
  height: 296,
};

export default () => (
  <div
    style={{
      display: 'flex',
      justifyContent: 'center',
      background: 'linear-gradient(to bottom, #16235e 0%, #020223 100%)',
    }}
  >
    <Carousel height={460} width={980} yOrigin={42} yRadius={48} autoPlay={true}>
      <div key={1} style={style}>
        <img alt="" src="/image/1.png" />
      </div>
      <div key={2} style={style}>
        <img alt="" src="/image/2.png" />
      </div>
      <div key={3} style={style}>
        <img alt="" src="/image/3.png" />
      </div>
      <div key={4} style={style}>
        <img alt="" src="/image/4.png" />
      </div>
      <div key={5} style={style}>
        <img alt="" src="/image/5.png" />
      </div>
      <div key={6} style={style}>
        <img alt="" src="/image/6.png" />
      </div>
    </Carousel>
  </div>
);

You may pass these options to the carousel constructor. Some of these properties may be changed during runtime via the data handle.

OptionDescriptionDefault
heightcontainer height
widthcontainer width
xOriginCenter of the carousel (x coordinate)(container width / 2)
yOriginCenter of the carousel (y coordinate)(container height / 10)
xRadiusHalf the width of the carousel(container width / 2.3)
yRadiusHalf the height of the carousel(container height / 6)
autoPlayauto playfalse

Getting Started

Install dependencies,

$ npm i

Start the dev server,

$ npm start

Build documentation,

$ npm run docs:build

Run test,

$ npm test

Build library via father,

$ npm run build

Keywords

react

FAQs

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