# Generative UI: Inputs

> Try bound forms, text fields, choices, sliders and dates.

Source: <https://everruns.com/docs/reference/generative-ui/inputs/>

Try bound forms, text fields, choices, sliders and dates.

[All categories](https://everruns.com/docs/reference/generative-ui/)[Layout](https://everruns.com/docs/reference/generative-ui/layout/)[Text](https://everruns.com/docs/reference/generative-ui/text/)[Inputs](https://everruns.com/docs/reference/generative-ui/inputs/)[Data](https://everruns.com/docs/reference/generative-ui/data/)[Dynamic values](https://everruns.com/docs/reference/generative-ui/dynamic-values/)[Media](https://everruns.com/docs/reference/generative-ui/media/)[Composites](https://everruns.com/docs/reference/generative-ui/composites/)[Feedback](https://everruns.com/docs/reference/generative-ui/feedback/)

Try the controls and expand **A2UI example** for source. Actions display their message and values locally; no account or agent run is needed. Use **Reset** to start again. External maps and media load only when you select their load button.

No examples match. Try another component name or category.

Inputs

## Button variants, colors, icon, Pressable

`Button``Pressable`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-13",
    "catalogId": "copilotkit/standard@1",
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 3,
        "children": [
          "r1",
          "r2",
          "p"
        ]
      },
      {
        "id": "r1",
        "component": "Row",
        "gap": 2,
        "wrap": "wrap",
        "children": [
          "a",
          "b",
          "c",
          "d"
        ]
      },
      {
        "id": "a",
        "component": "Button",
        "label": "Primary",
        "variant": "primary",
        "onClick": {
          "event": {
            "name": "primary"
          }
        }
      },
      {
        "id": "b",
        "component": "Button",
        "label": "Default",
        "onClick": {
          "event": {
            "name": "default"
          }
        }
      },
      {
        "id": "c",
        "component": "Button",
        "label": "Soft",
        "variant": "soft",
        "onClick": {
          "event": {
            "name": "soft"
          }
        }
      },
      {
        "id": "d",
        "component": "Button",
        "label": "Borderless",
        "variant": "borderless",
        "onClick": {
          "event": {
            "name": "borderless"
          }
        }
      },
      {
        "id": "r2",
        "component": "Row",
        "gap": 2,
        "wrap": "wrap",
        "children": [
          "e",
          "f",
          "g",
          "h"
        ]
      },
      {
        "id": "e",
        "component": "Button",
        "label": "Danger",
        "color": "danger",
        "onClick": {
          "event": {
            "name": "danger"
          }
        }
      },
      {
        "id": "f",
        "component": "Button",
        "label": "With icon",
        "icon": "arrow-right",
        "onClick": {
          "event": {
            "name": "icon"
          }
        }
      },
      {
        "id": "g",
        "component": "Button",
        "label": "Small",
        "size": "sm",
        "onClick": {
          "event": {
            "name": "small"
          }
        }
      },
      {
        "id": "h",
        "component": "Button",
        "label": "Disabled",
        "disabled": true,
        "onClick": {
          "event": {
            "name": "disabled"
          }
        }
      },
      {
        "id": "p",
        "component": "Pressable",
        "padding": 3,
        "border": true,
        "radius": "lg",
        "onClick": {
          "event": {
            "name": "pressable",
            "userMessage": "Pressed the card"
          }
        },
        "children": [
          "pt"
        ]
      },
      {
        "id": "pt",
        "component": "Text",
        "text": "Pressable: the whole box sends an event"
      }
    ]
  }
}
```

Inputs

## Form with TextField, TextArea, Select, submit

`Form``TextField``TextArea``Select`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-14",
    "catalogId": "copilotkit/standard@1",
    "dataModel": {
      "form": {
        "name": "",
        "email": "",
        "plan": "Team",
        "notes": ""
      }
    },
    "components": [
      {
        "id": "root",
        "component": "Card",
        "children": [
          "t",
          "form"
        ]
      },
      {
        "id": "t",
        "component": "Title",
        "text": "Request a quote"
      },
      {
        "id": "form",
        "component": "Form",
        "gap": 3,
        "onSubmit": {
          "event": {
            "name": "submit",
            "userMessage": "Request a quote",
            "context": {
              "name": {
                "@path": "/form/name"
              },
              "email": {
                "@path": "/form/email"
              },
              "plan": {
                "@path": "/form/plan"
              },
              "notes": {
                "@path": "/form/notes"
              }
            }
          }
        },
        "children": [
          "n",
          "e",
          "pl",
          "no",
          "row"
        ]
      },
      {
        "id": "n",
        "component": "TextField",
        "label": "Name",
        "placeholder": "Your name",
        "value": {
          "@path": "/form/name"
        }
      },
      {
        "id": "e",
        "component": "TextField",
        "label": "Email",
        "variant": "email",
        "placeholder": "you@company.com",
        "value": {
          "@path": "/form/email"
        }
      },
      {
        "id": "pl",
        "component": "Select",
        "label": "Plan",
        "options": [
          "Starter",
          "Team",
          "Enterprise"
        ],
        "value": {
          "@path": "/form/plan"
        }
      },
      {
        "id": "no",
        "component": "TextArea",
        "label": "Notes",
        "rows": 2,
        "placeholder": "Anything else?",
        "value": {
          "@path": "/form/notes"
        }
      },
      {
        "id": "row",
        "component": "Row",
        "justify": "end",
        "children": [
          "s"
        ]
      },
      {
        "id": "s",
        "component": "Button",
        "label": "Request quote",
        "submit": true
      }
    ]
  }
}
```

Inputs

## CheckBox, Radio, RadioGroup

`CheckBox``Radio``RadioGroup`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-15",
    "catalogId": "copilotkit/standard@1",
    "dataModel": {
      "a": true,
      "b": false,
      "days": "3",
      "goal": "strength"
    },
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 3,
        "children": [
          "c1",
          "c2",
          "rg",
          "rg2",
          "r"
        ]
      },
      {
        "id": "c1",
        "component": "CheckBox",
        "label": "Round checkbox (default)",
        "value": {
          "@path": "/a"
        }
      },
      {
        "id": "c2",
        "component": "CheckBox",
        "label": "Square, strikes when checked",
        "shape": "square",
        "lineThrough": true,
        "value": {
          "@path": "/b"
        }
      },
      {
        "id": "rg",
        "component": "RadioGroup",
        "label": "Days per week (pills)",
        "options": [
          "2",
          "3",
          "4",
          "5"
        ],
        "value": {
          "@path": "/days"
        }
      },
      {
        "id": "rg2",
        "component": "RadioGroup",
        "label": "Goal (list)",
        "variant": "list",
        "direction": "col",
        "options": [
          {
            "value": "strength",
            "label": "Strength",
            "description": "Heavier, fewer reps"
          },
          {
            "value": "endurance",
            "label": "Endurance",
            "description": "Lighter, longer"
          }
        ],
        "value": {
          "@path": "/goal"
        }
      },
      {
        "id": "r",
        "component": "Radio",
        "label": "A lone Radio (prefer RadioGroup)",
        "value": "x"
      }
    ]
  }
}
```

Inputs

## ChoicePicker: one or many, checkboxes or chips

`ChoicePicker`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-16",
    "catalogId": "copilotkit/standard@1",
    "dataModel": {
      "seat": [
        "Aisle"
      ],
      "extras": [
        "meal"
      ]
    },
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 4,
        "children": [
          "one",
          "many"
        ]
      },
      {
        "id": "one",
        "component": "ChoicePicker",
        "label": "Seat (one choice)",
        "options": [
          "Window",
          "Aisle",
          "Middle"
        ],
        "value": {
          "@path": "/seat"
        }
      },
      {
        "id": "many",
        "component": "ChoicePicker",
        "label": "Extras (several, as chips, filterable)",
        "variant": "multipleSelection",
        "displayStyle": "chips",
        "filterable": true,
        "options": [
          {
            "value": "bag",
            "label": "Checked bag"
          },
          {
            "value": "meal",
            "label": "Meal"
          },
          {
            "value": "wifi",
            "label": "Wi-Fi"
          },
          {
            "value": "lounge",
            "label": "Lounge"
          }
        ],
        "value": {
          "@path": "/extras"
        }
      }
    ]
  }
}
```

Inputs

## Slider, SegmentedControl, DateTimeInput

`Slider``SegmentedControl``DateTimeInput`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-17",
    "catalogId": "copilotkit/standard@1",
    "dataModel": {
      "seats": 10,
      "billing": "Monthly",
      "start": "2026-11-01"
    },
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 3,
        "children": [
          "sl",
          "seg",
          "dt"
        ]
      },
      {
        "id": "sl",
        "component": "Slider",
        "label": "Seats",
        "min": 1,
        "max": 50,
        "value": {
          "@path": "/seats"
        },
        "marks": [
          {
            "value": 1,
            "label": "1"
          },
          {
            "value": 25,
            "label": "25"
          },
          {
            "value": 50,
            "label": "50"
          }
        ]
      },
      {
        "id": "seg",
        "component": "SegmentedControl",
        "label": "Billing",
        "options": [
          "Monthly",
          "Annual"
        ],
        "value": {
          "@path": "/billing"
        }
      },
      {
        "id": "dt",
        "component": "DateTimeInput",
        "label": "Start date",
        "value": {
          "@path": "/start"
        }
      }
    ]
  }
}
```

Inputs

## DateTimeInput: date, time, date and time, time slots, bounds

`Column``DateTimeInput`

A2UI example

Put this operation inside an `a2ui` Markdown fence. Try the controls above. Actions appear locally in the preview; in an editable chat they become messages.

```
{
  "version": "1.0",
  "createSurface": {
    "surfaceId": "example-18",
    "catalogId": "copilotkit/standard@1",
    "dataModel": {
      "date": "2026-11-01",
      "time": "07:30",
      "pickup": "2026-11-03T14:30",
      "call": "",
      "delivery": ""
    },
    "components": [
      {
        "id": "root",
        "component": "Column",
        "gap": 3,
        "children": [
          "dtDate",
          "dtTime",
          "dtBoth",
          "dtSlots",
          "dtBounds"
        ]
      },
      {
        "id": "dtDate",
        "component": "DateTimeInput",
        "label": "Start date",
        "clearable": true,
        "value": {
          "@path": "/date"
        }
      },
      {
        "id": "dtTime",
        "component": "DateTimeInput",
        "label": "Alarm",
        "enableTime": true,
        "value": {
          "@path": "/time"
        }
      },
      {
        "id": "dtBoth",
        "component": "DateTimeInput",
        "label": "Pickup",
        "enableDate": true,
        "enableTime": true,
        "clearable": true,
        "value": {
          "@path": "/pickup"
        }
      },
      {
        "id": "dtSlots",
        "component": "DateTimeInput",
        "label": "Call time (30-minute slots)",
        "enableDate": true,
        "enableTime": true,
        "timeStep": 30,
        "min": "2026-11-02T09:00",
        "max": "2026-11-06T17:00",
        "value": {
          "@path": "/call"
        }
      },
      {
        "id": "dtBounds",
        "component": "DateTimeInput",
        "label": "Delivery hour (8 AM to 6 PM)",
        "enableTime": true,
        "timeStep": 60,
        "min": "08:00",
        "max": "18:00",
        "required": true,
        "value": {
          "@path": "/delivery"
        }
      }
    ]
  }
}
```

Using these components in chat? See [Generative UI in chat](https://everruns.com/docs/features/generative-ui/) and [AG-UI support](https://everruns.com/docs/integrations/ag-ui/).

Examples adapted from the [CopilotKit standard catalog](https://docs.copilotkit.ai/generative-ui/components/standard-catalog), under the [MIT license](https://github.com/everruns/everruns/blob/main/apps/ui/generative-ui/COPILOTKIT-LICENSE).