JengaRadioButton

fun JengaRadioButton(selected: Boolean, onClick: () -> Unit?, modifier: Modifier = Modifier, enabled: Boolean = true, colors: JengaRadioButtonColors = JengaRadioButtonDefaults.colors(), size: Dp = JengaRadioButtonDefaults.Size)(source)

A radio button for single-choice selection within a group.

Parameters

selected

whether this option is selected.

onClick

called when tapped; pass null for read-only/externally-driven (e.g. inside a selectable row), which also drops the control's own 48dp touch area.

modifier

the Modifier for this radio button.

enabled

whether the control is interactive.

colors

the color set; defaults to JengaRadioButtonDefaults.colors.

size

the diameter of the radio.

Samples

var selected by remember {
    mutableStateOf(
        value = true,
    )
}
JengaRadioButton(
    selected = selected,
    onClick = { selected = !selected },
)