ds_radio: Radio Button Component

View source: R/ds-input.R

ds_radioR Documentation

Radio Button Component

Description

Create a single styled radio button using Designsystemet styles. This is the building block used by ds_radio_group() — a standalone ds_radio() is not reactive on its own. To get a Shiny input value out of a group of radio buttons, use ds_radio_group() instead.

Usage

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

Arguments

inputId

The id/for pair linking this radio to its label

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")

shinyds documentation built on Aug. 22, 2026, 5:08 p.m.