Radio button

radio button

Radio Buttons are used when the user must make only one selection out of a group of items. Radio Buttons are generally used in groups describing a set of related options.

Usage

radio button

val items = arrayListOf(
    XelaRadioButtonItem("1", "Label", caption = "Caption"),
    XelaRadioButtonItem("2", "Label", caption = "Caption"),
    XelaRadioButtonItem("3", "Label", caption = "Caption"),
    XelaRadioButtonItem("4", "Label", caption = "Caption"),
    XelaRadioButtonItem("5", "Label", caption = "Caption"),
)

XelaRadioButtonGroup(items = items, onSelectedChange = {}, size = XelaRadioButtonSize.MEDIUM)

Properties XelaRadioButtonGroup

Name Type Default Value Required Description
items List<XelaRadioButtonItem> - YES Array of radio button items
onSelectedChange (item:XelaRadioButtonItem) -> Unit - YES On selected change action
itemBorder Boolean false NO Show radio button item border
size XelaRadioButtonSize YES Radio button size (LARGE, MEDIUM, SMALL)
selectedColor Color XelaColor.Blue3 NO Selected color
defaultColor Color XelaColor.Gray11 NO Default color
labelColor Color XelaColor.Gray2 NO Label color
captionColor Color XelaColor.Gray8 NO Caption color
valueColor Color XelaColor.Gray2 NO Value color
selectedItemID String NO Selected item ID

Properties XelaRadioButtonItem

Name Type Default Value Required Description
id String - YES Unique id radio button item
label String NO Label text radio button item, set empty string to hide
caption String NO Caption text radio button item, set empty string to hide
value String NO value text radio button item, set empty string to hide
state XelaRadioButtonState XelaRadioButtonState.DEFAULT NO Radio button state (DEFAULT, DISABLED)