Skip to content

Form Elements

Form elements are the building blocks of your forms. They come in two types:

  • Controls — Input fields that connect to schema properties (text, dropdowns, checkboxes, etc.)
  • Layouts — Containers that organize how controls are arranged (vertical, horizontal, tabs)

How Elements Work

Every form has a schema that defines the data structure and a uischema that defines how to display it.

yml
schema:
  type: object
  properties:
    name:              # ← Data definition
      type: string

uischema:
  type: VerticalLayout    # ← Layout element
  elements:
    - type: Control       # ← Control element
      scope: "#/properties/name"

The schema says "there's a string field called name" — the UI schema says "display it as a control inside a vertical layout."

Element Reference

Controls

Controls render input fields based on schema types:

ControlSchema TypeRenders As
Text inputstringSingle-line text field
Textareastring + multi: trueMulti-line text area
Number inputnumber or integerNumeric input
CheckboxbooleanSingle checkbox
Dropdownstring + enumSelect dropdown
Radio buttonsstring + enum + format: radioRadio button group
Checkbox grouparray + enumMultiple checkboxes
Date pickerstring + format: dateCalendar picker
File uploadobject or array + format: fileFile selector
Sliderinteger + slider: trueRange slider

See Controls for detailed documentation and examples.

Layouts

Layouts organize how controls are arranged:

LayoutDescription
VerticalLayoutStack elements top to bottom
HorizontalLayoutArrange elements side by side
CategorizationTabbed interface
CategoryA single tab within Categorization

See Layouts for detailed documentation and nesting examples.

Common Patterns

Simple Form

yml
uischema:
  type: VerticalLayout # Column
  elements: # Column content
    - type: Control
      scope: "#/properties/name"
    - type: Control
      scope: "#/properties/email"

Form with Rows

yml
uischema:
  type: VerticalLayout # Wrapper
  elements:
    - type: HorizontalLayout # Row
      elements: # Row content
        - type: Control # First column input
          scope: "#/properties/firstName"
        - type: Control # Second column input
          scope: "#/properties/lastName"
    - type: Control # Input below the row
      scope: "#/properties/email"

Tabbed Form

yml
uischema:
  type: Categorization # Tabs
  elements:
    - type: Category # Tab
      label: Personal
      elements: # Tab content
        - type: Control
          scope: "#/properties/name"
    - type: Category # Tab
      label: Contact
      elements:	# Tab content
        - type: Control
          scope: "#/properties/email"

Learn More