A set of buttons with custom values.

buttonGroupInput(id, choices = NULL, values = choices, ...)

updateButtonGroupInput(
  id,
  choices = NULL,
  values = choices,
  enable = NULL,
  disable = NULL,
  session = getDefaultReactiveDomain()
)

Arguments

id

A character string specifying the id of the reactive input.

choices

A character vector specifying the labels for each button in the group.

values

A vector of values specifying the values of each button in the group, defaults to labels.

...

Additional named arguments passed as HTML attributes to the parent element.

enable

One of values indicating individual buttons to enable or TRUE to enable the entire input, defaults to NULL.

disable

One of values indicating individual buttons to disable or TRUE to disable the entire input, defaults to NULL.

session

A reactive context, defaults to getDefaultReactiveDomain().

See also

Examples

### Default input buttonGroupInput( id = "group1", choices = c("Once", "Twice", "Thrice"), values = c(1, 2, 3) )
#> <div class="yonder-button-group btn-group" id="group1" role="group"> #> <button type="button" class="btn btn-grey" value="1">Once</button> #> <button type="button" class="btn btn-grey" value="2">Twice</button> #> <button type="button" class="btn btn-grey" value="3">Thrice</button> #> </div>
### Styling the button group buttonGroupInput( id = "group2", choices = c("Button 1", "Button 2", "Button 3") ) %>% background("blue") %>% width("1/3")
#> <div class="yonder-button-group btn-group w-1/3" id="group2" role="group"> #> <button type="button" class="btn btn-blue" value="Button 1">Button 1</button> #> <button type="button" class="btn btn-blue" value="Button 2">Button 2</button> #> <button type="button" class="btn btn-blue" value="Button 3">Button 3</button> #> </div>