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

List<XelaRadioButtonItem> items = [
    XelaRadioButtonItem(id: "1", label: "Label", caption: "caption", value: "\$15/mo", state: XelaRadioButtonState.DISABLED),
    XelaRadioButtonItem(id: "2", label: "Label", caption: "caption"),
    XelaRadioButtonItem(id: "3", label: "Label", caption: "caption", value: "\$25/mo"),
    XelaRadioButtonItem(id: "4", label: "Label", caption: "caption", ),
    XelaRadioButtonItem(id: "5", label: "Label", caption: "caption", ),
  ];

XelaRadioButtonGroup(
    items: items,
    onChange: (item) {},
    size: XelaRadioButtonSize.LARGE,
    selectedColor: XelaColor.Blue3,
    defaultColor: XelaColor.Gray11,
    labelColor: XelaColor.Gray2,
    captionColor: XelaColor.Gray8,
    valueColor: XelaColor.Gray2
)

Properties XelaRadioButtonGroup

Name Type Default Value Required Description
items List<XelaRadioButtonItem> - YES Array of radio button items
onChange Function(XelaRadioButtonItem) - YES On selected change action func
itemBorder bool false NO Show radio button item border
size XelaRadioButtonSize XelaRadioButtonSize.MEDIUM NO 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? null NO Selected item ID

Properties XelaRadioButtonItem

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