Learn R Programming

yonder (version 0.2.0)

buttonGroupInput: Button group inputs

Description

A set of buttons with custom values.

Usage

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

Other inputs: buttonInput(), checkbarInput(), checkboxInput(), chipInput(), fileInput(), formInput(), listGroupInput(), menuInput(), navInput(), radioInput(), radiobarInput(), rangeInput(), selectInput(), textInput()

Examples

Run this code
# NOT RUN {
### Default input

buttonGroupInput(
  id = "group1",
  choices = c("Once", "Twice", "Thrice"),
  values = c(1, 2, 3)
)

### Styling the button group

buttonGroupInput(
  id = "group2",
  choices = c("Button 1", "Button 2", "Button 3")
) %>%
  background("blue") %>%
  width("1/3")

# }

Run the code above in your browser using DataLab