Coder Social home page Coder Social logo

trendingtechnology / vue-ssr-carousel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bkwld/vue-ssr-carousel

1.0 1.0 0.0 1.91 MB

A performance focused Vue carousel designed for SSR/SSG environments.

Home Page: https://vue-ssr-carousel.netlify.app

License: MIT License

Vue 10.48% CoffeeScript 25.97% CSS 2.92% JavaScript 60.47% Stylus 0.16%

vue-ssr-carousel's Introduction

vue-ssr-carousel

A performance focused Vue carousel designed for SSR/SSG environments.

Check out the demo: https://vue-ssr-carousel.netlify.app.

Install

yarn add vue-ssr-carousel

Default

import SsrCarousel from 'vue-ssr-carousel'
import ssrCarouselCss from 'vue-ssr-carousel/index.css'
Vue.component 'ssr-carousel', SsrCarousel

Nuxt

// nuxt.config.js
export default {
  buildModules: [ 'vue-ssr-carousel/nuxt' ]
}

Usage

<ssr-carousel>
  <div class="slide">Slide 1</div>
  <div class="slide">Slide 2</div>
  <div class="slide">Slide 3</div>
</ssr-carousel>

For more examples, see the demo: https://vue-ssr-carousel.netlify.app.

API

Props

Slots

  • default - Where your slides get injected.
  • back-arrow - Replace the default back icon. Slot props:
    • disabled - True if at first page when not looping.
  • next-arrow - Replace the default next icon. Slot props:
    • disabled - True if at first page when not looping.
  • dot - Replace the default pagination dots. Slot props:
    • index - The page index that the dot represents.
    • disabled - True if dot represents current page.

Methods

  • next() - Go forward a page or slide, depending on the paginate-by-slide prop
  • back() - Go back a page or slide, depending on the paginate-by-slide prop
  • goto(index) - Go to an index. If paginate-by-slide is false, this equates to a page offset. If true, this equates to a slide offset.

Events

See https://vue-ssr-carousel.netlify.app/events

  • change({ index }) - Fired when the internal index counter changes
  • press - Fired on mouse or touch down
  • release - Fired on mouse or touch up
  • drag:start - Fired on start of dragging
  • drag:end - Fired on end of dragging
  • tween:start({ index }) - Fired when the carousel starts tweening to it's final position
  • tween:end({ index }) - Fired when the carousel has finished tweening to it's destination.

vue-ssr-carousel's People

Contributors

isaazgarcia avatar jonjahr avatar sjstark avatar weotch avatar

Stargazers

 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.