Coder Social home page Coder Social logo

yufy1314 / vuescroll Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yvescoding/vuescroll

1.0 1.0 0.0 2.59 MB

Customize scrollbars and smooth-scroll on Vue.js.

Home Page: http://vuescrolljs.yvescoding.org/

License: MIT License

JavaScript 97.88% CSS 2.12%

vuescroll's Introduction

Vuescroll

VersionBuild Status Coverage License Download prettier

Demo

Online Demo(Recommend to use mobile)

Introduction

Vuescroll is a customizable, multi-mode driven scrollbar plugin based on Vue.js - vuescrolljs.yvescoding.org

You can use it on PC or mobile by changing its mode.

Features

Basic & native mode features

Slide mode(includes basic & slide mode features) features

  • Support pull to refresh and push to load, for detail, you can checkout this demo, and this demo of SSR version.

  • Support snapping. Snapping means you can scroll same given distance in options at each timem. You can use it to make a time-picker.

  • Support paging. Paging means you can scroll a distance of container at each time. You can use it to make such a Carousel.

Quick Start

Import

In your entry file:

import Vue from 'vue';
import vuescroll from 'vuescroll';
import 'vuescroll/dist/vuescroll.css';

Vue.use(vuescroll);

In order to reduce the size of the bundle, you can import modes separately

Only import the features of slide mode:

import Vue from 'vue';
import vuescroll from 'vuescroll/dist/vuescroll-slide';
import 'vuescroll/dist/vuescroll.css';

Vue.use(vuescroll);

Only import the features of native mode:

import Vue from 'vue';
import vuescroll from 'vuescroll/dist/vuescroll-native';
import 'vuescroll/dist/vuescroll.css';

Vue.use(vuescroll);

Usage

Wrap the content you need to scroll by vuescroll

  <template>
    <div class='your-container'>
        <!-- bind your configurations -->
        <vue-scroll :ops="ops">
            <div class='your-content'>
            </div>
        </vue-scroll>
    </div>
  </template>
  <script>
    export default {
      data() {
        return {
          ops: {
            // some configs....
          }
        }
      }
    }
  </script>

Detailed guides

Changelog

Detailed changes for each release are documented in the release notes.

Contribution

Please check out CONTRIBUTING.

Communication

For bug report or feature request, you can raise an issue or twitter @wangyi70991

License

MIT

vuescroll's People

Contributors

diomed avatar wangyi7099 avatar yufy1314 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.