Giter Site home page Giter Site logo

vue-owl-carousel's Introduction

npm


Intro

Installation

npm i -s vue-owl-carousel or yarn add vue-owl-carousel

Usage

<script>

import carousel from 'vue-owl-carousel'

export default {
    components: { carousel },
}

</script>

Basic Usage

<carousel>

    <img src="https://placeimg.com/200/200/any?1">

    <img src="https://placeimg.com/200/200/any?2">

    <img src="https://placeimg.com/200/200/any?3">

    <img src="https://placeimg.com/200/200/any?4">

</carousel>

Custom prev and next buttons using slot, the buttons will be hidden while start and end in non-loop mode

<carousel>

    <template slot="prev"><span class="prev">prev</span></template>

    //

    <template slot="next"><span class="next">next</span></template>

</carousel>

Set options,

<carousel :autoplay="true" :nav="false">

//

</carousel>

Set events,

<carousel @changed="changed" @updated="updated">

//

</carousel>

Available options

Currently following options are available.

  • items

type : number

default : 3

The number of items you want to see on the screen.

  • margin

type : number

default : 0

Margin-right (px) on item.

  • loop

type : boolean

default : false

Infinity loop. Duplicate last and first items to get loop illusion.

  • center

Type: Boolean

Default: false

Center item. Works well with even an odd number of items.

  • nav

Type: Boolean

Default: false

Show next/prev buttons.

  • autoplay

Type: Boolean

Default: false

Autoplay.

  • autoplaySpeed

Type: Number/Boolean

Default: false

Autoplay speed.

  • rewind

Type: Boolean

Default: true

Go backwards when the boundary has reached.

  • mouseDrag

Type: Boolean

Default: true

Mouse drag enabled.

  • touchDrag

Type: Boolean

Default: true

Touch drag enabled.

  • pullDrag

Type: Boolean

Default: true

Stage pull to edge.

  • freeDrag

Type: Boolean

Default: false

Item pull to edge.

  • stagePadding

Type: Number

Default: 0

Padding left and right on stage (can see neighbours).

  • autoWidth

Type: Boolean

Default: false

Set non grid content. Try using width style on divs.

  • autoHeight

Type: Boolean

Default: false

Set non grid content. Try using height style on divs.

  • dots

Type: Boolean

Default: true

Show dots navigation.

  • autoplayTimeout

Type: Number

Default: 5000

Autoplay interval timeout.

  • autoplayHoverPause

Type: Boolean

Default: false

Pause on mouse hover.

  • responsive

Type: Object

Default: {}

Example : :responsive="{0:{items:1,nav:false},600:{items:3,nav:true}}"

Object containing responsive options. Can be set to false to remove responsive capabilities.

Available events

The trigger timing can see Owl Carousel document

  • initialize
  • initialized
  • resize
  • resized
  • refresh
  • refreshed
  • update
  • updated
  • drag
  • dragged
  • translate
  • translated
  • to
  • changed

๐Ÿ’ฅ NPM

NPM

vue-owl-carousel's People

Contributors

naveenraina avatar rdomingue avatar s950329 avatar

Watchers

 avatar  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.