input_radio_group: Radio inputs

View source: R/input-radio-group.R

input_radio_groupR Documentation

Radio inputs

Description

A stylized radio input. A reactive input with multiple choices where only one choice and value at most may be selected.

Usage

input_radio_group(
  id,
  choices = NULL,
  ...,
  values = choices,
  select = NULL,
  disable = NULL,
  appearance = c("default", "buttons", "list")
)

update_radio_group(
  id,
  choices = NULL,
  values = choices,
  selected = NULL,
  inline = FALSE,
  enable = NULL,
  disable = NULL,
  valid = NULL,
  invalid = NULL,
  session = getDefaultReactiveDomain()
)

Arguments

id

A character string. The id of the reactive input.

choices

A character vector or list of tag elements specifying the input's choices.

...

Optional named arguments specifying HTML attributes for the input element.

values

A character vector, list of character strings, vector of values to coerce to character strings, or list of values to coerce to character strings specifying the values of the radio input's choices, defaults to choices.

disable

A boolean. The checkbox starts disabled if TRUE.

selected

One of values indicating the default selected value of the radio input, defaults to NULL, in which case the first choice is selected by default.

inline

If TRUE, the radio input renders inline, defaults to FALSE, in which case the radio controls render on separate lines.

session

A shiny session object.

See Also

Other inputs: fileInput(), input_button(), input_checkbox(), input_checkbox_group(), input_chip(), input_form(), input_list_group(), input_menu(), radiobarInput(), rangeInput(), selectInput(), textInput()


nteetor/dull documentation built on July 4, 2025, 8:52 a.m.