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

flat-carousel

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flat-carousel

tiny react carousel component

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
811
decreased by-4.92%
Maintainers
1
Weekly downloads
 
Created
Source

FlatCarousel

a tiny carousel component for react.

Demo

Features

  • no dependency
  • support autoplay
  • support touch and mouse device
  • transition done with raf and tweening.
  • infinite loop without duplicating the first&last item

Demo

import Carousel from 'flat-carousel';

const images = [
    { src: 'some image' }
];

const MyCarousel = () => (
    <Carousel>
        {images.map((image, index) => (
            <div
                key={index}
                className="demo-item"
                style={{ backgroundImage: 'url(' + image.src + ')' }}
            />
        ))}
    </Carousel>
);

Props

  • initialIndex?: number, defaults to 0
  • transitionDuration?: number, defaults to 400ms
  • autoplay?: boolean, defaults to true
  • autoplayInterval?: number, defaults to 3000ms
  • infiniteLoop?: boolean, defaults to true
  • onPageChange?(index: number): void;

Keywords

FAQs

Package last updated on 15 Dec 2019

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