Skip to content

RadioButtonCore

@Composable



fun RadioButtonCore(
    selected: Boolean, 
    onSelect: () -> Unit, 
    enabled: Boolean = true, 
    content: @Composable



 (modifier: Modifier, isHovered: Boolean, isFocused: Boolean, selected: Boolean) -> Unit
)

Low-level unstyled radio-button behavior, built on Modifier.selectable.

Calls onSelect on press only when not already selected (clicking an already-selected radio option is a no-op, matching standard radio-group semantics) - the same on Enter/Space while this is a vanilla keyboard/controller focus-navigation stop. Applies no visuals - that is up to content.

Parameters

  • selected: Whether this option is currently selected.

  • onSelect: Invoked when this (unselected) option is clicked.

  • enabled: When false, pointer events are ignored.

  • content: The visual content; receives the Modifier to apply to its own node, plus hover/focus state and selected.