countup_start: Start

View source: R/proxy.R

countup_startR Documentation

Start

Description

Start the counter.

Usage

countup_start(counter)

Arguments

counter

An object of class countupProxy as returned by countupProxy().

Value

The counter

Examples

library(shiny)

ui <- fluidPage(
  countupOutput("cnt"),
  actionButton("start", "start")
)

server <- function(input, output, session) {

  output$cnt <- renderCountup({
    countup(24, start = FALSE)
  })

  observeEvent(input$start, {
    countupProxy("cnt") %>% 
      countup_start()
  })

}

## Not run: shinyApp(ui, server)


JohnCoene/countup documentation built on Jan. 21, 2025, 12:46 p.m.