UNPKG

go-to-top-react

Version:

A lightweight and customizable React component that adds a 'Go to Top' button to your web application.

61 lines (39 loc) 1.84 kB
[![npm version](https://badge.fury.io/js/angular2-expandable-list.svg)](https://badge.fury.io/js/angular2-expandable-list) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) # go-to-top-react > A lightweight and customizable React component that adds a "Go to Top" button to your web application. ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. To install and set up the library, run: - [Demo](https://i.ibb.co/7nK00Vy/ezgif-4-4c2eb5555b.gif) <img src=https://i.ibb.co/7nK00Vy/ezgif-4-4c2eb5555b.gif alt=devto style="margin-bottom: 5px;" /> ## Installation You can install the package via npm: ```bash npm install go-to-top-react ``` Or you can install the package via yarn: ```bash yarn add go-to-top-react ``` ```jsx import React from "react"; import { GoToTop } from "go-to-top-react"; function App() { return ( <div> <h1>Welcome to My App</h1> {/* Other content */} <GoToTop /> {/* Add any custom css class */} {/* <GoToTop className='your-custom-class'/>*/} </div> ); } export default App; ``` ## Authors - **Suyel Haque** - [Facebook](https://www.facebook.com/slsuyel2) - [GitHub](https://github.com/slsuyel) - [Linkedin](https://www.linkedin.com/in/slsuyel) ## GitHub - [GitHub](https://github.com/slsuyel/back-to-top) This README provides a basic overview of the application, including installation instructions, usage examples, and information about the features and license. You can further customize it with additional details as needed.