Socket
Socket
Sign inDemoInstall

@imagine10255/react-carousel

Package Overview
Dependencies
4
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@imagine10255/react-carousel

Most modern mobile touch slider with hardware accelerated transitions by react


Version published
Maintainers
1

Readme

Source

Most modern mobile touch slider with hardware accelerated transitions by react

NPM JavaScript Style Guide

Install

yarn add react-carousel

Usage

import React, { Component } from 'react'

import ReactCarousel from '@imagine10255/react-carousel'
import '@imagine10255/react-carousel/dist/index.css'


const bgList = [
  {id: 1, image: '/static/sample/01.jpg'},
  {id: 2, image: '/static/sample/02.jpg'},
  {id: 3, image: '/static/sample/03.jpg'},
  {id: 4, image: '/static/sample/04.jpg'},
  {id: 5, image: '/static/sample/05.jpg'},
  {id: 6, image: '/static/sample/06.jpg'},
  {id: 7, image: '/static/sample/07.jpg'},
  {id: 8, image: '/static/sample/08.jpg'},
  {id: 9, image: '/static/sample/09.jpg'},
];

const carouselData = bgList.map(row => {
  return {
    key: String(row.id),
    children: <div
      style={{
        backgroundImage: `url(${row.image})`,
      }}
    />
  };
});


class Example extends Component {


const useBgData = bgList.map(row => {
  return {
    key: String(row.id),
    children: <div
      className="carousel_item"
      style={{
        backgroundImage: `url(${row.image})`,
      }}
    />
  };
});

  render() {
    return <ReactCarousel
        isDebug={true}
        isEnablePagination={true}
        data={carouselData}
        slidesPerView={1}
        slidesPerGroup={1}
      />
  }
}

npm Push

npm publish

License

MIT © imagine10255

FAQs

Last updated on 24 Jan 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