radiobutton
README.md
:OCRadioButton - A Custom Composable UI Component
The OCRadioButton is a custom Jetpack Compose component designed to represent a radio button
input.
Features:
- Customizable appearance and behavior.
- Supports different states(active or inactive).
- Integration with Jetpack Compose-based UIs.
:How to use OCCheckBox
-
Add the necessary imports:
import your.package.name.OCRadioButton -
Use the
OCRadioButtonwithin your Composable:val selectedState = remember { mutableStateOf(false) }
OCRadioButton(
selected = selectedState.value,
onClick = {
selectedState.value = selectedState.value.not()
}
)
Parameters:
enabled: represents active or inactive state of the checkbox.selected: Boolean denotes if radio button is selected or not.onClick: Action when user clicks on the radio button.