Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-scroll-to-top

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-scroll-to-top - npm Package Compare versions

Comparing version 2.0.3-beta.0 to 2.0.3-beta.1

2

package.json
{
"name": "react-scroll-to-top",
"author": "Herman Nygaard",
"version": "2.0.3-beta.0",
"version": "2.0.3-beta.1",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -14,7 +14,13 @@ # react-scroll-to-top

Run `npm i react-scroll-to-top`
With npm:
`npm i react-scroll-to-top`
or with Yarn:
`yarn add react-scroll-to-top`
## Usage
Import and then include `<ScrollToTop />` anywhere in your render/return function:
Import and then add `<ScrollToTop />` at the bottom of your return function (for a11y reasons):

@@ -27,4 +33,5 @@ ```js

<div>
<h1>Hello, world!</h1>
<div style={{ marginTop: "150vh" }} />
<ScrollToTop smooth />
<h1>Hello, world!</h1>
</div>

@@ -31,0 +38,0 @@ );

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