Index
Edit

String

Vanilla, string-of-characters input. Produces <input type="text" />. If you are looking for a multi-line (<textarea ... />) version, see the Text type.

PROPERTIES

  • optionsobject - Extra type options. See below.

OPTIONS

  • listarray - A list of predefined values that the user can choose from. The array can include either strings ['sci-fi', 'western'] or objects [{title: 'Sci-Fi', value: 'sci-fi'}, ...]
  • layoutstring - Controls how the list items appears in forms. If set to 'radio' will render list items as radio buttons, if set to 'dropdown' a dropdown menu will be displayed. Default is dropdown

Example

{
  title: 'Summary',
  name: 'summary',
  type: 'string'
}

Example: List of Predefined Options

{
  title: 'Genre',
  name: 'genre',
  type: 'string',
  options: {
list: [
{title: 'Sci-Fi', value: 'sci-fi'},
{title: 'Western', value: 'western'}
], // <-- predefined values
layout: 'radio' // <-- defaults to 'dropdown' } }

Previous: ObjectNext: Text