GithubHelp home page GithubHelp logo

airem-richard / vue-boobblock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bruceczk/vue-boobblock

0.0 1.0 0.0 15 KB

A lightweight directive for booklet-like component using codrops/BookBlock https://github.com/codrops/BookBlock

JavaScript 76.22% HTML 14.00% CSS 9.77%

vue-boobblock's Introduction

vue-bookblock

A lightweight directive for booklet-like component using codrops/BookBlock

Live Demo

Installation

NPM

npm install vue-bookblock

Setup

import Vue from 'vue'
import BookBlock from 'vue-bookblock'

Vue.use(BookBlock)

Options

{
  // page to start on
  startPage: 1,

  // vertical or horizontal flip
  orientation: 'vertical',

  // ltr (left to right) or rtl (right to left)
  direction: 'ltr',

  // speed for the flip transition in ms
  speed: 1000,

  // easing for the flip transition
  easing: 'ease-in-out',

  // if set to true, both the flipping page and the sides will have an overlay to simulate shadows
  shadows: true,

  // opacity value for the "shadow" on both sides (when the flipping page is over it)
  // value : 0.1 - 1
  shadowSides: 0.2,

  // opacity value for the "shadow" on the flipping page (while it is flipping)
  // value : 0.1 - 1
  shadowFlip: 0.1,

  // if we should show the first item after reaching the end
  circular: false,

  // if we want to specify a selector that triggers the next() function. example: ´#bb-nav-next´
  nextEl: '',

  // if we want to specify a selector that triggers the prev() function
  prevEl: '',

  // autoplay. If true it overwrites the circular option to true
  autoplay: false,

  // hasCover. If true the first item will become cover and be centered
  hasCover: true,

  // page selector using upon initialize
  itemSelector: '.bb-item',

  // time (ms) between page switch, if autoplay is true
  interval: 3000,

  // 3d perspective
  perspective: 1200,

  // callback after the flip transition
  // old is the index of the previous item
  // page is the current item´s index
  // isLimit is true if the current page is the last one (or the first one)
  onEndFlip: function (old, page, isLimit) {
    return false;
  },

  // callback before the flip transition
  // page is the current item´s index
  onBeforeFlip: function (page) {
    return false;
  }
}

Contributing

# install dependencies
npm install

# serve with hot reload at localhost:3000
npm run dev

Inspired by vue-sortable

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

vue-boobblock's People

Contributors

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