Luncher / react-carousel

react carousel component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Carousel

GitHub npm Travis (.com)

A tiny React Carousel Component.

Quick Start

install

yarn add react-carousel-lite -S

import styles

import 'react-carousel-lite/dist/index.css'

Usage

import Carousel from 'react-carousel-lite'

export function App() {
  return (
    <Carousel autoplay>
      // {...content}
    </Carousel>
  )
}

Props

Name Type Default Description
autoplay Boolean false A boolean indicates whether to play automatically
dotPosition left/right/top/bottom bottom Carousel dot position
easing CSSProperties['animationTimingFunction'] linear css animationTimingFunction
effect slide/fade slide The effect type
interval Number 2000 ms The time interval of the slider change
beforeChange Function NOOP beforeChange will be triggered before slide change
afterChange Function NOOP afterChange will be triggered after slide changed
children ReactNode - Slide content

About

react carousel component

License:MIT License


Languages

Language:TypeScript 57.9%Language:Less 21.8%Language:JavaScript 20.2%