Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

counterbutton

Counter Button


Description

Creates a counter button whose value increments by one each time it is pressed.

Usage

counter_button(
  input_id,
  label = "",
  icon = NULL,
  value = 0,
  color = "",
  size = "",
  big_mark = " "
)

Arguments

input_id

The input slot that will be used to access the value.

label

the content of the item to display

icon

an optional icon() to appear on the button.

value

initial rating value (integer)

color

character with semantic color

size

character with size of the button, eg. "medium", "big"

big_mark

big numbers separator

Value

counter button object

Examples

if (interactive()) {
library(shiny)
library(shiny.semantic)
ui <-semanticPage(
     counter_button("counter", "My Counter Button",
                   icon = icon("world"),
                   size = "big", color = "purple")
 )
server <- function(input, output) {
 observeEvent(input$counter,{
   print(input$counter)
  })
 }
shinyApp(ui, server)
}

shiny.semantic

Semantic UI Support for Shiny

v0.4.2
MIT + file LICENSE
Authors
Filip Stachura [aut], Dominik Krzeminski [cre], Krystian Igras [aut], Adam Forys [aut], Paweł Przytuła [aut], Jakub Chojna [aut], Olga Mierzwa-Sulima [aut], Ashley Baldry [ctb], Jakub Chojna [ctb], Olga Mierzwa-Sulima [ctb], Pedro Manuel Coutinho da Silva [ctb], Paweł Przytuła [ctb], Kamil Żyła [ctb], Rabii Bouhestine [ctb], Appsilon Sp. z o.o. [cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.