countup_pause_resume | R Documentation |
Pause or resume the counter.
countup_pause_resume(counter)
counter |
An object of class |
The counter
library(shiny)
ui <- fluidPage(
countupOutput("cnt"),
actionButton("pause/resume", "pause")
)
server <- function(input, output, session) {
output$cnt <- renderCountup({
countup(1000, duration = 10)
})
observeEvent(input$pause, {
countupProxy("cnt") %>%
countup_pause_resume()
})
}
## Not run: shinyApp(ui, server)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.