Skip to contents

Create a styled radio button using Designsystemet styles.

Usage

ds_radio(
  inputId,
  label,
  value,
  name,
  checked = FALSE,
  size = NULL,
  disabled = FALSE,
  ...
)

Arguments

inputId

The input slot for Shiny reactivity

label

The radio button label

value

The value for this radio button

name

The name grouping radio buttons together

checked

If TRUE, this radio is initially selected

size

Size variant ("sm", "md", "lg")

disabled

If TRUE, disables the radio button

...

Additional attributes

Value

A Shiny tag object

Examples

ds_radio("opt_a", label = "Option A", value = "a", name = "opts")
#> <input id="opt_a" name="opts" class="ds-input" type="radio" value="a"/>
#> <label for="opt_a">Option A</label>