Basic Routing for Shiny Web Applications

It is a simple router for your Shiny apps. The router allows you to create dynamic web applications with real-time User Interface and easily share url to pages within your Shiny apps.


shiny.router shiny.router logo

A minimalistic router for your Shiny apps.

R-CMD-check codecov cranlogs total

Now it's possible to recreate a state of your app, by providing a specific URL, like:

router_ui(
  route("<your_app_url>/main",  mainPageShinyUI),
  route("<your_app_url>/other", otherPageShinyUI)
)

How to install?

It's possible to install this library through CRAN

install.packages("shiny.router")

The most recent version you can get from this repo using remotes.

remotes::install_github("Appsilon/shiny.router")

How to use it?

Basic usage:

library(shiny)
library(shiny.router)

root_page <- div(h2("Root page"))
other_page <- div(h3("Other page"))

ui <- fluidPage(
  title = "Router demo",
  router_ui(
    route("/", root_page),
    route("other", other_page)
  )
)

server <- function(input, output, session) {
  router_server()
}

shinyApp(ui, server)

Check the tutorial for more details on how to start using shiny.router.

Examples

An application that showcases the shiny.router features can be found here:

It was built using two other Appsilon Open Source packages:

  • rhino - an R package designed to help building high quality, enterprise-grade Shiny applications at speed.
  • shiny.fluent - Microsoft's Fluent UI for Shiny apps.

You can also visit examples directory for some complete samples.

How to contribute?

If you want to contribute to this project please submit a regular PR, once you're done with new feature or bug fix.

Reporting a bug is also helpful - please use GitHub issues and describe your problem as detailed as possible.

Appsilon

Appsilon is a Posit (formerly RStudio) Full Service Certified Partner.
Learn more at appsilon.com.

Get in touch [email protected]

Explore the Rhinoverse - a family of R packages built around Rhino!

We are hiring!

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("shiny.router")

0.3.1 by Ryszard Szymański, 4 years ago


https://appsilon.github.io/shiny.router/, https://github.com/Appsilon/shiny.router


Report a bug at https://github.com/Appsilon/shiny.router/issues


Browse source code at https://github.com/cran/shiny.router


Authors: Ryszard Szymański [cre, aut] , Jakub Nowicki [aut] , Filip Stachura [aut] , Dominik Krzemiński [aut] , Krystian Igras [aut] , Servet Ahmet Çizmeli [ctb] , Appsilon Sp. z o.o. [cph]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports htmltools, glue, rlang, shiny

Suggests covr, lintr, rcmdcheck, spelling, testthat


Suggested by muiMaterial, shiny.blueprint, shiny.fluent, shinyNextUI.


See at CRAN