Learn R Programming

shinyMobile (version 0.7.0)

updateF7Progress: update a framework7 progress bar from the server side

Description

update a framework7 progress bar from the server side

Usage

updateF7Progress(session, id, value)

Arguments

session

Shiny session object.

id

Unique progress bar id.

value

New value.

Examples

Run this code
# NOT RUN {
if (interactive()) {
 library(shiny)
 library(shinyMobile)

 shiny::shinyApp(
   ui = f7Page(
     title = "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(session, id = "pg1", value = input$obs)
     })
   }
 )
}
# }

Run the code above in your browser using DataLab