انتقل إلى المحتوى الرئيسي

radio

A radio button group with predefined options. Similar to select but displays all options as radio buttons instead of a dropdown.

Properties

PropertyTypeRequiredDescription
type"radio"YesField type identifier
labelstringYesLabel shown in the builder
optionsArray<{label, value}>YesList of selectable options
defaultstringNoDefault selected value

Usage

{
"alignment": {
"type": "radio",
"label": "Text Alignment",
"options": [
{ "label": "Left", "value": "left" },
{ "label": "Center", "value": "center" },
{ "label": "Right", "value": "right" }
],
"default": "center"
}
}
select vs radio

Use radio when you have 2-4 options and want them all visible at once. Use select for longer lists where a dropdown is more appropriate.

Interactive Preview

Interactive Preview
Live Output
{
  "alignment": "center"
}