type StringField = {
  label: string
  name: string
  type: 'string'
  list?: boolean
  options?: (string | { value: string; label: string })[]
  /** Represents the "body" of a markdown file **/
  isBody: boolean
  /** See docs/reference/toolkit/fields for customizing the UI **/
  ui?: object

With options

Specifying an options array will provide a selection list

As a list

Setting list: true will make the value an array

As a list with options

Setting list: true and providing options will make the value an array with a selection list

The isBody property

When working with markdown, you can indicate that a given field should repesent the markdown body

Overriding the component

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

Providing a custom component

You can create your own components by adding them to the CMS

Last Edited: July 27, 2021