kor TürkçeGitHub

RadioGroup

Presents a single choice as rows or descriptive cards.

kor/ui/RadioGroupSource

When to use

  • Show every option when users need to compare them before choosing.

Examples

Two delivery options

Loading the example

<k:RadioGroup label="Delivery method" selectedKey="pickup" change=".onChange">
	<k:RadioItem key="pickup" text="Pickup"/>
	<k:RadioItem key="carrier" text="Carrier"/>
</k:RadioGroup>

Compare delivery details

Loading the example

<k:RadioGroup label="Dispatch method" cards="true" selectedKey="pickup" change=".onChange">
	<k:RadioItem key="pickup" icon="boxes" text="Warehouse pickup" help="Collect it from the east entrance."/>
	<k:RadioItem key="carrier" icon="truck" text="Carrier delivery" help="Delivery takes two working days."/>
</k:RadioGroup>

API

Properties

NameTypeDefaultDescription
selectedKeystringKey of the selected option
labelstringGroup label
cardsbooleanfalseWhether to show options as cards
errorstringValidation message
requiredbooleanfalseWhether a selection is required
enabledbooleantrueWhether the group can be used

Aggregations

NameTypeDescription
itemsRadioItem[]Available choices

Events

NameTypeDescription
changekey: stringSelection changed

RadioItem

An option in a radio group.

Properties

NameTypeDefaultDescription
keystringOption key
textstringOption text
helpstringSupporting text
iconstringIcon name

Related

SelectFieldSegmented