BackToTop

This is the component you can see at the bottom-right corner of your window when you scroll down. Its default behavior doesn't require any prop, so you can use it straight of the box. It will appear automatically on the bottom-right corner when the page is scrolled, and it will scroll back smoothly to the top of the page when you click on it.

You can cutomize the height from which the Button will apear upon scrolling by overriding the mixins.backToTop.startHeight property from the theme.

Note: clicking on the button in the stories will bring you back to the top of the window ;)

Default

Small

Extended

This component was extended using styled() from styled-components.

Props

This component extends Material's UI <Fab> component so you can use all its props. Check out its Api. It doesn't require any other prop.

NameTypeDefaultDescription
childrennodeOptional. There already is the arrow icon as a child. However, you can still bring any node you would like to render inside the button.
keepHashboolfalseBy default, the component will clear any existing hash from the URL when clicked, since it goes to the top of the page. Set this prop to true if you don't want this behavior.

The ref will be forwarded to the html root element, as well as any other props.