View source: R/input-button-group.R
buttonGroupInput | R Documentation |
A set of buttons with custom values.
buttonGroupInput(
...,
id,
choices = NULL,
values = choices,
direction = "horizontal"
)
updateButtonGroupInput(
id,
choices = NULL,
values = choices,
enable = NULL,
disable = NULL,
session = getDefaultReactiveDomain()
)
... |
Additional named arguments passed as HTML attributes to the parent element. |
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 character vector specifying the values of each button in the
group, defaults to |
direction |
One of |
enable |
One of |
disable |
One of |
session |
A reactive context, defaults to |
Button groups can be laid in two directions, horizontal or vertical.
buttonGroupInput( .style %>% background("primary"), id = NULL, choices = c("Grape", "Raspberry", "Kiwi") )
Vertical button groups can help fill available space.
buttonGroupInput( .style %>% background("primary"), id = NULL, choices = c("Cherry", "Apple", "Pear") )
buttonGroupInput( id = "group1", choices = c("Once", "Twice", "Thrice"), values = c(1, 2, 3) )
buttonGroupInput( .style %>% background("primary"), id = "group2", choices = c("Button 1", "Button 2", "Button 3") )
Other inputs:
buttonInput()
,
checkbarInput()
,
checkboxInput()
,
chipInput()
,
fileInput()
,
formInput()
,
listGroupInput()
,
menuInput()
,
navInput()
,
radioInput()
,
radiobarInput()
,
rangeInput()
,
selectInput()
,
textInput()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.