buttonGroupInput: Button group inputs

Description Usage Arguments See Also Examples

View source: R/button.R

Description

A set of buttons with custom values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
### 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")

yonder documentation built on Jan. 11, 2020, 9:35 a.m.