Skip to main content
Version: Next

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

  1. Add the necessary imports:

    import your.package.name.OCRadioButton

  2. Use the OCRadioButton within 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.