shinyTimer widget
shinyTimer.Rd
shinyTimer widget
Usage
shinyTimer(
inputId,
label = NULL,
hours = 0,
minutes = 0,
seconds = 0,
type = "simple",
frame = "circle",
...
)
Arguments
- inputId
The input id.
- label
The label to display above the countdown.
- hours
An integer, the starting time in hours for the countdown.
- minutes
An integer, the starting time in minutes for the countdown.
- seconds
An integer, the starting time in seconds for the countdown.
- type
The type of the countdown timer display ("simple", "mm:ss", "hh:mm:ss", "mm:ss.cs").
- frame
The shape of the timer's container ("none", "circle", "rectangle").
- ...
Any additional parameters you want to pass to the placeholder for the timer (
htmltools::tags$div
).
Examples
if (interactive()) {
library(shiny)
shinyApp(
ui = fluidPage(
shinyTimer("timer", label = "Countdown Timer", seconds = 10)
),
server = function(input, output, session) {
observeEvent(input$start, {
countDown("timer", session)
})
}
)
}