Radio Button

Description

Create a radio button with a label.

Usage

bc_radio(
  id,
  label,
  ...,
  checked = FALSE,
  disabled = FALSE,
  invalid = FALSE,
  description = NULL,
  name = id
)

Arguments

Argument Description
id String. The input ID, also used as the radio's value.
label String or tag. The label.
... Extra tag attributes for the radio.
checked Bool. Whether the radio starts selected. Defaults to FALSE.
disabled Bool. Whether the radio is disabled. Defaults to FALSE.
invalid Bool. Whether to show the invalid state. Defaults to FALSE.
description String or tag. Helper text shown under the label.
name String. The input name. Defaults to id.

Value

An htmltools tag.

Examples

bc_radio("default", "Default")

bc_radio("comfortable", "Comfortable", checked = TRUE, disabled = TRUE)