Fields
String Field
A text input for short-form content like titles and descriptions
A text input for short-form content. For formatted text with bold, italic, links, etc., use the rich-text field instead.
Usage
{
type: 'string',
name: 'title',
label: 'Title',
}Options
| Property | Type | Description |
|---|---|---|
type | 'string' | Required. |
name | string | Field identifier. |
label | string | Display label in the editor. |
list | boolean | Store multiple values as an array. |
options | string[] | Restrict to predefined values (renders as dropdown). |
ui.component | 'text' | 'textarea' | 'select' | Input component to use. |
Type Signature
interface StringField {
type: 'string'
name: string
label?: string
list?: boolean
options?: string[] | { value: string; label: string }[]
ui?: {
component?: 'text' | 'textarea' | 'select' | React.FC
}
}Examples
List of Strings
{
type: 'string',
name: 'tags',
label: 'Tags',
list: true,
}Textarea
{
type: 'string',
name: 'description',
label: 'Description',
ui: { component: 'textarea' },
}Dropdown with Options
{
type: 'string',
name: 'status',
label: 'Status',
options: ['draft', 'published', 'archived'],
}