f7Progress | R Documentation |
f7Progress
creates a progress bar.
updateF7Progress
update a framework7 progress bar from the server side
f7Progress(id, value = NULL, color) updateF7Progress(id, value, session = shiny::getDefaultReactiveDomain())
id |
Unique progress bar id. |
value |
New value. |
color |
Progress color. See https://framework7.io/docs/progressbar.html. |
session |
Shiny session object. |
David Granjon, dgranjon@ymail.com
# Progress bars if(interactive()){ library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "Progress", f7SingleLayout( navbar = f7Navbar(title = "f7Progress"), f7Block(f7Progress(id = "pg1", value = 10, color = "pink")), f7Block(f7Progress(id = "pg2", value = 100, color = "green")), f7Block(f7Progress(id = "pg3", value = 50, color = "orange")) ) ), server = function(input, output) {} ) } # Update progress if (interactive()) { library(shiny) library(shinyMobile) shinyApp( ui = f7Page( title = "Update Progress", f7SingleLayout( navbar = f7Navbar(title = "f7Progress"), f7Block( f7Progress(id = "pg1", value = 10, color = "blue") ), f7Slider( inputId = "obs", label = "Progress value", max = 100, min = 0, value = 50, scale = TRUE ) ) ), server = function(input, output, session) { observeEvent(input$obs, { updateF7Progress(id = "pg1", value = input$obs) }) } ) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.