Coder Social home page Coder Social logo

vue-go-top's Introduction

vue-go-top

Scroll to page top button, Vue.js component.

Demo

Demo

Install

Browser

<script src="vue.js"></script>
<script src="vue-go-top.min.js"></script>

npm

npm install --save @inotom/vue-go-top

Usage

Browser

<div id="app">
  <go-top></go-top>
</div>

<script src="vue.js"></script>
<script src="vue-go-top.min.js"></script>
<script>
Vue.use(GoTop);
new Vue({
  el: '#app'
});
</script>

SFC

<template>
  <go-top></go-top>
</template>

<script>
import GoTop from '@inotom/vue-go-top';

export default {
  components: {
    GoTop
  }
}
</script>

Props

name type defaults description
:size Number 70 width/height pixel size
:right String, Number 50 margin from right
:bottom String, Number 100 margin from bottom
:bottom-gap String, Number 0 gap of bottom margin
:z-index Number 1000 z-index size
fg-color String #ffffff text color
bg-color String #ffc966 background color
:radius String, Number 50% border-radius size
weight String normal line weight of arrow
ripple-bg String rgba(255, 255, 255, .5) ripple animation color
:boundary Number 200 top position where the element is displayed
:max-width Number 640 media query max-width(px)
src String null image url
alt String `` alternative text for image
:has-outline Boolean true show outline when focus
box-shadow String 1px 1px 2px rgba(0, 0, 0, .3) box-shadow property
:tabindex Number 0 tabindex property

License

MIT

Author

inotom

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.