input_checkbox: Checkbox and switch inputs

View source: R/input-checkbox.R

input_checkboxR Documentation

Checkbox and switch inputs

Description

Reactive checkbox and checkbar inputs. Users may select one or more choices. The checkbox input appears as a standard checkbox or set of checkboxes. When a checkbox input has no selected choices the reactive value is NULL. Switch inputs differ from checkboxes only in appearance.

Usage

input_checkbox(
  id,
  choices = NULL,
  values = choices,
  selected = NULL,
  inline = FALSE,
  ...
)

input_checkbox_button(id, choices, values = choices, selected = NULL, ...)

Arguments

id

A character string specifying the id of the reactive input.

choices

A character string or vector specifying a label or labels for the checkbox or checkbar.

values

A character string or vector specifying values for the checkbox or checkbar input, defaults to choice or values, respectively.

selected

One or more of values specifying which choices are selected by default, defaults to NULL, in which case no choices are initially selected.

inline

One of TRUE or FALSE specifying if the checkbox input choices render inline or stacked, defaults to FALSE, in which case the choices are stacked.

...

Additional named arguments passed as HTML attributes to the parent element or tag elements passed as child elements to the parent element.

disable

One of values specifying particular choices to disable or TRUE specifying the entire input is disabled, defaults to NULL.

session

A reactive context, defaults to getDefaultReactiveDomain().

See Also

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


nteetor/yonder documentation built on June 12, 2025, 3:49 a.m.