An open API service indexing awesome lists of open source software.

https://github.com/hypebright/scroll-to-top-shiny

Creating a "scroll to top" button in Shiny that becomes visible when the user starts to scroll the page
https://github.com/hypebright/scroll-to-top-shiny

Last synced: 3 months ago
JSON representation

Creating a "scroll to top" button in Shiny that becomes visible when the user starts to scroll the page

Awesome Lists containing this project

README

        

# Scroll to Top button in Shiny ✨

Creating a "scroll to top" button in Shiny that becomes visible when the user starts to scroll the page. When the user clicks on the button, the `scrollTop` position gets set back to 0.

A solution using plain HTML, CSS and JavaScript that works in both a simple Shiny layout generated with `fluidPage()` and `bslib` layouts generated with `page_navbar()` and `page_sidebar()`. Note that other layout might require other classes to be targeted. For more information about what class to target you can watch the YouTube video below.

# View tutorial on YouTube 🎥

[Watch the tutorial](https://youtu.be/8p0-MQp91QU) on my YouTube channel!