Description Usage Arguments Value Note Examples
Adds PWA support. Takes care of all the support required for browsers to recognize the application as a Progressive Web app.
1 2 3 4 5 6 7 8 9 |
domain |
The base URL where the app is hosted |
title |
The title of your Shiny app |
output |
Relative folder where to create the service worker file. Usually corresponds to the folder used by shiny to serve static files, this folder must exist and is usually the www folder of your shiny project. |
icon |
Icon path to be used for the app, relative to the project root. Recommended size is 512x512px. If left NULL a default icon is provided. |
color |
Color of the app. Used to color the browser elements when the pwa is installed. |
offline_template |
Path to the offline template you want to use, relative to the project root folder. If left NULL the default template is used. |
offline_message |
When using the default offline page template defines the message to be displayed. |
A UI definition that can be passed to the [shinyUI] function.
For additional details on progressive web apps, visit https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps
1 2 3 4 5 6 7 8 9 | if (interactive()){
library(shiny.pwa)
ui <- fluidPage(
pwa("https://myapp.com", output = "www")
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.