Core Input Components
StringInput
Renders a text input for string fields. Supports both basic text input and Portable Text mode.Current value of the string field
Schema type definition containing configuration like title, placeholder, and validation rules
Callback function to update the field value
Whether the input should be read-only
Array of validation errors and warnings to display
Props for the underlying HTML input element including id, ref, onChange, onFocus, onBlur
Array of user presence indicators (who else is viewing/editing this field)
NumberInput
Renders a number input with validation and accessibility features.Current numeric value
Schema type definition with number-specific validation rules
Callback to update the value
Aggregated validation error message
HTML input element props
- Automatically sets
inputMode="numeric"for mobile keyboards whenmin >= 0andintegervalidation - Prevents accidental value changes on mouse wheel scroll
- Respects min/max validation rules from schema
BooleanInput
Renders a checkbox or switch for boolean fields.Current boolean value
Schema type with optional
options.layout for ‘checkbox’ or ‘switch’ (default)Callback to update the value
Whether the input is read-only
Element props including id and event handlers
switch(default): Toggle switch UIcheckbox: Traditional checkbox UI
ObjectInput
Renders fields for object types, with support for field groups and nested structures.Current object value
Schema type definition including fields array
Array of field members to render
Field groups for tabbed organization
Callback for value changes
Callback when switching between field groups/tabs
Function to render nested input components
Function to render field wrappers with labels
- Automatic field grouping with tabs
- Support for
columnsoption for grid layout - Collapsible field sets
- Unknown field detection and warnings
ArrayInput
Renders array inputs with support for objects, primitives, and different layouts.Current array value
Array schema type definition
Array of item members
Callback for changes
Add item to end of array
Add item to beginning of array
Remove item by key
Reorder array items
Function to render array item inputs
Function to render array item wrappers
Common Props
All input components share these common props:Unique ID for the input element
Field path in the document as an array of segments
Nesting level in the form (0 for root fields)
Whether the field is read-only
Real-time presence information for collaborative editing
Validation errors, warnings, and info messages
Default render function for the input
Input Element Props
Primitive inputs (string, number, boolean) receiveelementProps containing:
FormInput Component
TheFormInput component renders a specific field at a given path within an object or array input.
Absolute path to the field to render
Relative path from the current input (alternative to absolutePath)
Whether to render the field wrapper with label (default: false)
Whether to render the array item wrapper (default: false)
Related
- Form Hooks - Hooks for accessing form state and values
- Validation API - Define validation rules for fields