shinyTimer {shinyTimer} | R Documentation |
shinyTimer widget
Description
shinyTimer widget
Usage
shinyTimer(
inputId,
label = NULL,
hours = 0,
minutes = 0,
seconds = 0,
type = "simple",
background = "none",
...
)
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"). |
background |
The shape of the timer's container ("none", "circle", "rectangle"). |
... |
Any additional parameters you want to pass to the placeholder for the timer ( |
Value
A shiny UI component for the countdown timer.
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)
})
}
)
}
[Package shinyTimer version 0.1.0 Index]