MpDS Back-To-Top
React component for faster and simpler web development.
Installation
MpDS Back-To-Top is available as an [npm package](npm i mpds-back-to-top).
// with npm
npm i mpds-back-to-top
Usage
Here is a quick example to get you started, it's all you need:
import * as React from "react";
import MpdsBackToTop from "mpds-back-to-top"
function App() {
return <MpdsBackToTop typeOfThePosition="absolute"></MpdsBackToTop>
}
ReactDOM.render(<App />, document.querySelector('#app'));
Props
Name | Description | Default |
---|
typeOfThePosition
|
CSS position gave to the element.
"static"
"absolute"
"fixed"
"relative"
"sticky"
"initial"
"inherit"
|
static
|
classes
|
Classes in the button element.
|
-
|
timeOfTransition
|
The duration for the transition, in milliseconds.
|
1000
|
handleClick
|
Callback fired when element is clicked.
|
-
|
Yes, it's really all you need to get started! Try it in:
[CodeSandbox](https://codesandbox.io/)
License
No License. "(...) nobody else can copy, distribute, or modify your work without being at risk of take-downs, shake-downs, or litigation."