Git Product home page Git Product logo

carousel-component's Introduction

Dependency Status devDependency Status Build Status npm version Downloads

carousel-component

A vuejs and reactjs carousel component.

install

npm i carousel-component

link css

<link rel="stylesheet" href="./node_modules/carousel-component/dist/carousel.min.css" />

vuejs component demo

npm i vue vue-class-component

import "carousel-component/dist/vue";
<carousel :data="data"
    timeout="500"
    interval="3000"
    count="5"
    width="200"
    height="150">
</carousel>

the online demo: https://plantain-00.github.io/carousel-component/demo/vue/index.html

the source code of the demo: https://github.com/plantain-00/carousel-component/tree/master/demo/vue

reactjs component demo

import { Carousel } from "carousel-component/dist/react";
<Carousel data={this.data}
    timeout={500}
    interval={3000}
    count={5}
    width={200}
    height={150}>
</Carousel>

the online demo: https://plantain-00.github.io/carousel-component/demo/react/index.html

the source code of the demo: https://github.com/plantain-00/carousel-component/tree/master/demo/react

properties and events of the component

name type description
data CarouselData[] the data of the carousel
timeout number the animation time in milliseconds
interval number the movement time in milliseconds
count number the item count at most
width number width of an item
height number height of items

carousel data structure

type CarouselData = {
    component: string | Function; // the item component, for vuejs, it is the component name, for reactjs, it is the class object
    data: any; // the data will be passed to the component as `data` props
};

features

  • vuejs component
  • reactjs component
  • commonjs module
  • custom component

carousel-component's People

Contributors

plantain-00 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.