Socket
Socket
Sign inDemoInstall

vanilla-back-to-top

Package Overview
Dependencies
0
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.2.0 to 7.2.1

2

INSTALL.md
# Install
If you don't want to rely on [unpkg.com](https://unpkg.com/#/about), save [the file](https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/v7.2.0/dist/vanilla-back-to-top.min.js) to your project and serve it from your server:
If you don't want to rely on [unpkg.com](https://unpkg.com/#/about), save [the file](https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/v7.2.1/dist/vanilla-back-to-top.min.js) to your project and serve it from your server:
```html

@@ -5,0 +5,0 @@ <script src="/assets/vanilla-back-to-top.min.js"></script>

@@ -7,16 +7,16 @@ # All options

addBackToTop({
backgroundColor = '#000',
cornerOffset = 20, // px
diameter = 56, // px
ease = inOutSine, // any one from https://www.npmjs.com/package/ease-component will do
id = 'back-to-top',
backgroundColor: '#000',
cornerOffset: 20, // px
diameter: 56, // px
ease: inOutSine, // any one from https://www.npmjs.com/package/ease-component will do
id: 'back-to-top',
innerHTML: '<svg viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>',
onClickScrollTo = 0, // px
scrollContainer = document.body, // or a DOM element, e.g., document.getElementById('content')
scrollDuration = 100, // ms
showWhenScrollTopIs = 1, // px
size = diameter, // alias for diameter
textColor = '#fff',
zIndex = 1
onClickScrollTo: 0, // px
scrollContainer: document.body, // or a DOM element, e.g., document.getElementById('content')
scrollDuration: 100, // ms
showWhenScrollTopIs: 1, // px
size: diameter, // alias for diameter
textColor: '#fff',
zIndex: 1
})
```
{
"name": "vanilla-back-to-top",
"version": "7.2.0",
"version": "7.2.1",
"description": "Simple and tiny Back To Top button with no dependencies. Hides when on top, scrolls up smoothly when clicked. Works equally great with Vue, React, Angular and without frameworks on Jekyll, Hugo and Hexo",

@@ -5,0 +5,0 @@ "main": "dist/vanilla-back-to-top.umd.js",

# Vanilla Back To Top
[![No Dependencies](http://svgshare.com/i/4rU.svg)](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.0/package.json)
[![File Size](https://unpkg.com/vanilla-back-to-top@7.2.0/size-shield.svg)](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.0/dist/vanilla-back-to-top.min.js.gz)
[![No Dependencies](http://svgshare.com/i/4rU.svg)](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.1/package.json)
[![File Size](https://unpkg.com/vanilla-back-to-top@7.2.1/size-shield.svg)](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.1/dist/vanilla-back-to-top.min.js.gz)
[![GitHub stars](https://img.shields.io/github/stars/vfeskov/vanilla-back-to-top.svg?style=social&label=Stars)](https://github.com/vfeskov/vanilla-back-to-top)

@@ -9,3 +9,3 @@

[<img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/coral.png" width="66" /><img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/smaller.png" width="57" /><img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/rectangle.png" width="121" /><img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/different-arrow.png" width="72" />](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.0/EXAMPLES.md)<br/>
[<img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/coral.png" width="66" /><img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/smaller.png" width="57" /><img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/rectangle.png" width="121" /><img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/different-arrow.png" width="72" />](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.1/EXAMPLES.md)<br/>

@@ -23,3 +23,3 @@ <img src="https://raw.githubusercontent.com/vfeskov/vanilla-back-to-top/fd6b302da46f551fe3d1085029fcb8ba67517388/examples/images/live.gif" width="320px"/>

- No dependencies or requirements
- Works great with [Vue](https://vuejs.org/), [React](https://reactjs.org/), [Angular](https://angular.io/) and other frameworks, see [INSTALL](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.0/INSTALL.md)
- Works great with [Vue](https://vuejs.org/), [React](https://reactjs.org/), [Angular](https://angular.io/) and other frameworks, see [INSTALL](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.1/INSTALL.md)
- Works great on static websites with [Jekyll](https://jekyllrb.com/), [Hugo](https://gohugo.io/), [Hexo](https://hexo.io) and others

@@ -31,3 +31,3 @@

```html
<script src="https://unpkg.com/vanilla-back-to-top@7.2.0/dist/vanilla-back-to-top.min.js"></script>
<script src="https://unpkg.com/vanilla-back-to-top@7.2.1/dist/vanilla-back-to-top.min.js"></script>
<script>addBackToTop({

@@ -39,11 +39,11 @@ diameter: 56,

```
For alternative installation see [INSTALL](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.0/INSTALL.md)
For alternative installation see [INSTALL](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.1/INSTALL.md)
See [EXAMPLES](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.0/EXAMPLES.md)
See [EXAMPLES](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.1/EXAMPLES.md)
For all options see [OPTIONS](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.0/OPTIONS.md)
For all options see [OPTIONS](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.1/OPTIONS.md)
## License
MIT, see [LICENSE](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.0/LICENSE)
MIT, see [LICENSE](https://github.com/vfeskov/vanilla-back-to-top/blob/v7.2.1/LICENSE)

@@ -50,0 +50,0 @@ Default icon from [Material Design Icons](https://material.io/icons/#ic_keyboard_arrow_up) under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), which only restricts re-selling the icon

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc