Learn R Programming

yonder (version 0.2.0)

checkbarInput: Checkbar input

Description

A stylized checkbox input. The checkbar input appears similar to a group of buttons, but with a checked or highlighted state.

Usage

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

updateCheckbarInput( id, choices = NULL, values = choices, selected = NULL, enable = NULL, disable = NULL, session = getDefaultReactiveDomain() )

Arguments

id

A character string specifying the id of the reactive input.

choices

A character vector or list of tag element specifying the input's choices, defaults to NULL.

values

A vector of values specifying the values of the input's choices, defaults to choices.

selected

One or more of values specifying the input's default selected values, defaults to NULL.

...

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

enable

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

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: buttonGroupInput(), buttonInput(), checkboxInput(), chipInput(), fileInput(), formInput(), listGroupInput(), menuInput(), navInput(), radioInput(), radiobarInput(), rangeInput(), selectInput(), textInput()

Examples

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

checkbarInput(
  id = "cb1",
  choices = c("When", "Why", "Where")
)

### Modifying background color

checkbarInput(
  id = "cb2",
  choices = c("What", "Which")
) %>%
  background("teal")

### Labeling a checkbar

formGroup(
  label = "Toppings",
  checkbarInput(
    id = "fixins",
    choices = c(
      "Sprinkles",
      "Nuts",
      "Fudge"
    )
  )
)

# }

Run the code above in your browser using DataLab