Segmented JSON Form

Choose a typed enum using segmented buttons.

How this example works

Segmented requires a primitive enum and at least one enabled option. Optional x-options supplies labels and disabled states with exact enum coverage. The selected value preserves its original type. Without a default the first enabled choice initializes; this example explicitly defaults to the numeric value 1. Reset restores it.

Read the supported schema guide

Segmented example

View

Current value: 1

Submitted JSON

Submit the form to see its JSON.