Skip to content

Enums ​


Select menu (default) — USelectMenu ​

Trigger: schema enum or oneOf const/title, with no special format.

API ​

NameTypeDefaultDescription
suggestionArray—Free-form suggestions (also usable outside a strict enum).
placeholderString—Placeholder.
selectMenuObject—Pass-through → USelectMenu (search, size, …).

Example ​

json
{
  "type": "string",
  "title": "Country",
  "enum": ["FR", "BE", "CH"]
}
json
{
  "type": "Control",
  "scope": "#/properties/country",
  "options": {
    "placeholder": "Choose…",
    "selectMenu": { "size": "md" }
  }
}

Select (no search) — USelect ​

Trigger: options.format: "select".

API ​

NameTypeDefaultDescription
format"select"—Required.
selectObject—Pass-through → USelect.

Example ​

json
{
  "type": "Control",
  "scope": "#/properties/tier",
  "options": {
    "format": "select",
    "placeholder": "Plan",
    "select": { "size": "sm" }
  }
}

Radio — URadioGroup ​

Trigger: options.format: "radio".

API ​

NameTypeDefaultDescription
format"radio"—Required.
verticalBooleantrue (effective)false → horizontal orientation.
orientation"horizontal" | "vertical"—Takes precedence over vertical when set.
radioGroupObject—Pass-through → URadioGroup (variant, size, color, orientation, …).

Orientation precedence: radioGroup.orientation > orientation > vertical: false > vertical.

Examples ​

json
{
  "type": "Control",
  "scope": "#/properties/size",
  "options": {
    "format": "radio",
    "vertical": false
  }
}
json
{
  "type": "Control",
  "scope": "#/properties/plan",
  "options": {
    "format": "radio",
    "orientation": "horizontal",
    "radioGroup": {
      "variant": "list",
      "size": "md",
      "color": "primary"
    }
  }
}

Multi-enum — UCheckboxGroup ​

Trigger: schema type: "array" with items.enum or items.oneOf.

API ​

NameTypeDefaultDescription
verticalBoolean—false → horizontal layout.
checkboxGroupObject—Pass-through → UCheckboxGroup.

Example ​

json
{
  "type": "array",
  "title": "Skills",
  "uniqueItems": true,
  "items": {
    "type": "string",
    "enum": ["vue", "typescript", "css"]
  }
}
json
{
  "type": "Control",
  "scope": "#/properties/skills",
  "options": {
    "vertical": false,
    "checkboxGroup": { "size": "sm" }
  }
}

Playground ​

Released under the BSD-3-Clause License.