0.0.2 • Published 1 year ago

scroll-util v0.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

Installation

# npm
npm install scroll-util

# yarn
yarn add scroll-util

Usage

React

import { scrollToElement } from "scroll-util";
import { useEffect } from "react";

function MyComponent() {
    return (
        <button onClick={() => scrollToElement("my-div")}>Click me!</button>
        <div id="my-div" style={{
            height: "100vh",
            width: "100%"
        }}>
            <span>My div</span>
        </div>
    );
}

Browser

scroll-util currently does not support browser JS but will do so in the future.

Note: documentation in development

Links

License

This project is licensed under the Apache-2.0 license.

0.0.1

1 year ago

0.0.2

1 year ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago