Loving Tina? us on GitHub0.0k

Docs

Learn

v.Latest
Documentation

String Fields

On This Page

A text input field used to store short-form content, such as titles or descriptions.

For indents, embolding and other formatting, use the rich-text field type instead.

Type Definition

For additional properties common to all Field types, check the Field type definition.
REQUIRED
type
string

Set this to "string" to use the String Field.


REQUIRED
name
string

The name of the field for internal use.

All properties marked as REQUIRED must be specified for the field to work properly.

Examples

Simple field

{
type: 'string',
name: 'title',
label: 'Title'
}

Simple list field

SettingĀ list: trueĀ will make the value an array

{
type: 'string',
name: 'title',
label: 'Title',
list: true
}

Field with text area component

By default, the text field is used forĀ strings. To use a different core field plugin, specify it with theĀ ui.component property.

{
label: "Description",
name: "description",
type: "string",
ui: {
component: "textarea"
}
}

Field with custom component

You canĀ create your own components for the TinaCMS editor to store String type content.

{
label: "Title",
name: "title",
type: "string",
ui: {
component: ({ input }) => {
return (
<div>
<label htmlFor="title">Title: </label>
<input {...input}></input>
</div>
);
},
},
}

Last Edited: September 18, 2025