Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

carouselbox

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

carouselbox

React Carousel Plugin based from Flickity

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

Flickity React

React Carousel Plugin based from Flickity

Installation

  npm install flickity --save
  npm install carouselbox --save
  npm install glamor --save

Example

import React from 'react';
import { style, merge } from 'glamor';
import ReactCarousel from 'carouselbox';

let carousel = style ({ 
  background: '#EEE',
  margin: '0 auto',
  width: '300px'
})

let carouselCell = style ({
  width: '300px',
  height: '200px',
  margin: '0 auto',
  background: '#8C8',
  borderRadius: '5px',
  counterIncrement: 'gallery-cell'
})

let carouselCellHover = style({
  ':before': {
    display: 'block',
    textAlign: 'center',
    content: 'counter(gallery-cell)',
    lineHeight: '200px',
    fontSize: '80px',
    color: 'white'
  }
})

export default class Rawr extends React.Component {  
  render() {
    var flickityOptions = {
        cellAlign: 'center',
        contain: false,
        freeScroll: false,
        autoPlay: false,
        wrapAround: false
    } /* Override your Flickity Options Here */
    
    return (
      <ReactCarousel className={ carousel } /* options = { flickityOptions } */>
        <div className={merge(carouselCell, carouselCellHover)}></div>
        <div className={merge(carouselCell, carouselCellHover)}></div>
        <div className={merge(carouselCell, carouselCellHover)}></div>
        <div className={merge(carouselCell, carouselCellHover)}></div>
        <div className={merge(carouselCell, carouselCellHover)}></div>
      </ReactCarousel>
    );
  }
}

export default Rawr;

FAQs

Package last updated on 15 Nov 2016

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