Radio Input
Description
A single radio input with its label, wrapped in a field.
Usage
bc_radio(
id,
label,
...,
checked = FALSE,
disabled = FALSE,
invalid = FALSE,
description = NULL,
name = id
)
Arguments
| Argument | Description |
|---|---|
id |
String. The input id, and the for of its label. |
label |
String or tag. The label content. |
... |
Attributes passed to the <input>. |
checked |
Bool. Whether the radio starts selected. |
disabled |
Bool. Whether the radio is disabled. |
invalid |
Bool. Whether to show the invalid state. |
description |
String or tag. Helper text shown under the label, wired to the input with aria-describedby. |
name |
String. The input name, defaulting to id. |
Value
A <div> tag with role="group" containing radio and field.
Examples
bc_radio("default", "Default")
bc_radio("comfortable", "Comfortable", checked = TRUE, disabled = TRUE)