0.0.16 • Published 3 years ago

skh-slider v0.0.16

Weekly downloads
97
License
MIT
Repository
github
Last release
3 years ago

skh-slider

Vue Slider Made of Web Animation API

Demo Page

Image Slider

Information

Web Animation Api Support Browser

Install

$ npm i skh-slider

How to Use

<imageSlider
        :options="options"
        :srcArr="srcArr"
        :rotationEnd="rotationEnd"
        :animationEnd="animationEnd"
        style="width: 100%; height: 100%;"
      ></imageSlider>

import { imageSlider } from "skh-slider";
export default {
  components: {
    imageSlider
  },
  data() {
    return {
      options: {
        ms: 3000,
        type: "slide",
        loop: true,
        appear : true,
        animationOptions: {
          duration: 1500,
          fill: "none",
          easing: "ease"
        },
        imageOptions: {
          objectFit: "contain"
        }
      },
      srcArr: [
        "https://your_source_url1.png",
        "https://your_source_url2.png",
        "https://your_source_url3.png",
        "https://your_source_url4.png"
      ]
    };
  },
}

Options

options : determine base options

ms : setTimeout Milliseconds type : slide | fade appear : true | false (whether to start animation from the beginning) loop : repeat Animation endless (animationEnd callback not fire)

animationOptions : determine Animation Options in web animation api duration : slide duration between two element

imageOptions : determine Image options (currently support objectFit)

objectFit : contain | fill | cover | none | scale-down

Warning

Make Sure to Enable Cache in Browser!

License

MIT

0.0.16

3 years ago

0.0.15

3 years ago

0.0.13

3 years ago

0.0.14

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago