{"id":16971524,"url":"https://github.com/johncoene/shinyscroll","last_synced_at":"2026-03-11T10:32:09.049Z","repository":{"id":85366755,"uuid":"235596719","full_name":"JohnCoene/shinyscroll","owner":"JohnCoene","description":"Scroll to an element in Shiny","archived":false,"fork":false,"pushed_at":"2020-07-17T09:49:54.000Z","size":279,"stargazers_count":23,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-08T11:42:13.868Z","etag":null,"topics":["r","rstats","shiny"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohnCoene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-01-22T14:58:31.000Z","updated_at":"2025-03-21T21:18:26.000Z","dependencies_parsed_at":"2023-07-02T22:31:33.808Z","dependency_job_id":null,"html_url":"https://github.com/JohnCoene/shinyscroll","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JohnCoene/shinyscroll","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fshinyscroll","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fshinyscroll/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fshinyscroll/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fshinyscroll/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnCoene","download_url":"https://codeload.github.com/JohnCoene/shinyscroll/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Fshinyscroll/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30378081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["r","rstats","shiny"],"created_at":"2024-10-14T00:52:15.973Z","updated_at":"2026-03-11T10:32:09.023Z","avatar_url":"https://github.com/JohnCoene.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\n# shinyscroll\n\nProgramatically scroll in Shiny.\n\n## Installation\n\nInstall it with `remotes` from Github:\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"JohnCoene/shinyscroll\")\n```\n\n## Example\n\n{shinyscroll} was created to solve the use case below, where I want the window to scroll to a plot dynamically created by a click in a DT table.\n\n``` r\nlibrary(DT)\nlibrary(shiny)\nlibrary(shinyscroll)\n\nui \u003c- fluidPage(\n  use_shinyscroll(),\n  h1(\"shinyscroll\"),\n  p(\"Select a row\"),\n  DTOutput(\"table\"),\n  plotOutput(\"plot\")\n)\n\nserver \u003c- function(input, output, session){\n\n  output$table \u003c- renderDT({\n    datatable(cars, selection = \"single\", options = list(pageLength = 20L))\n  })\n\n  dataset \u003c- eventReactive(input$table_rows_selected, {\n    scroll(\"plot\") # scroll to plot\n    runif(100)\n  })\n\n  output$plot \u003c- renderPlot(plot(dataset()))\n}\n\nshinyApp(ui, server)\n```\n\n![](./man/figures/shinyscroll.gif)\n\nIt's also used in the DXY tab of the [coronavirus tracker](http://shiny.john-coene.com/coronavirus)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoene%2Fshinyscroll","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohncoene%2Fshinyscroll","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoene%2Fshinyscroll/lists"}