New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ra-scrolltop

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ra-scrolltop

🌝A vue component that goes back to the top of the page.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by66.67%
Maintainers
1
Weekly downloads
 
Created
Source

ra-scrolltop

🌝A vue component that goes back to the top of the page.

  • 中文
  • English

demo

install by npm or yarn

npm

npm install ra-scrolltop --save

yarn

yarn add ra-scrolltop

import and use

Import for global usage

import Vue from 'vue'
import RaScrolltop from 'ra-scrolltop'

Vue.use(RaScrolltop)

Or on a single component

import RaScrolltop from 'ra-scrolltop'
...
components: { RaScrolltop }
...

Props

NameTypeDefaultDescription
bottomString40pxbottom offset when component is visible
rightString30pxright offset when component is visible
speedStringaveragethe rate of upward sliding, ['average', 'fast-to-slow','immediate']
offset[String, Number]600where the component can visible when the user scrolls to an offset
theme[new]stringscroll-circleprovide some theme styles, ['scroll-circle', 'orange', 'rocket', 'rectangular']

Events

NameDescription
scrolledFired when page's scroll ends

How to use

default

<ra-scrolltop>
</ra-scrolltop>

It's possible to use your own html/vue component inside vue-backtotop component.

<ra-scrolltop>
    <button>Top</button>
</ra-scrolltop>

Now, you can add some props

<ra-scrolltop right="50px" bottom="20px" speed="immediate">
    <button>Top</button>
</ra-scrolltop>

Release Notes

v1.x

  • Configuration with speed, position and slot

v2.x

  • Add theme configuration - theme

Note

I am sorry that before version 1.0.3, I forgot to export the install function, which resulted in the undefined error of the component.

At the same time, my design ability is not very good, so I hope users can help to add some themes for other users to use. Thank you!

MIT

LICENCE

Keywords

FAQs

Package last updated on 20 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc