Overview
Form artifacts render interactive forms directly in the chat. Users can submit data back to the AI.Variants
Fields
Standard form with input fields:Wizard
Multi-step form:Buttons
Quick action buttons:Display Modes
| Mode | When to Use |
|---|---|
inline | Simple forms (1-3 fields), buttons |
panel | Complex forms, wizards, file uploads |
Field Types
| Type | Description |
|---|---|
text | Single-line text |
email | Email input |
password | Password input |
number | Numeric input |
tel | Phone number |
url | URL input |
textarea | Multi-line text |
select | Dropdown |
radio | Radio buttons |
checkbox | Checkbox |
date | Date picker |
time | Time picker |
file | File upload |
rating | Star rating |
color | Color picker |
range | Slider |
Field Properties
Select/Radio Options
Button Actions
Buttons in forms can have different actions:| Action | Description | Form Behavior |
|---|---|---|
submit | Submit the form | Collapses with ✓ |
cancel | Cancel the form | Collapses with ✗ |
reset | Reset to default values | Stays active |
| Custom string | Custom action (e.g., "continue", "skip") | Collapses with ✓ |
Form Collapse Behavior
Inline forms automatically collapse after user interaction to keep the chat clean and prevent duplicate submissions.States
| State | Icon | Description |
|---|---|---|
active | — | Form is interactive |
submitted | ✓ | User submitted or clicked action button |
cancelled | ✗ | User clicked cancel |
inactive | — | Historical form after page refresh |
Visual Appearance
When collapsed, forms display a compact bar showing:- Status icon (checkmark, X, or dash)
- Form title
Page Refresh Behavior
After a page refresh:- Last message: Forms stay active (user can still interact)
- Older messages: Forms collapse as “inactive”
isLastMessage prop to ArtifactuseAgentMessage:
Handling Submissions
- Vue
- React
- Svelte