List

Lists are a convenience wrapper around text fields, splitting lines of text into an array of strings for input and joining them together as output.

Example

{
  type: "list",
  label: "List",
  placeholder: "Start typing...",
}

Options

Input

Use these options when using the field with take.

key?
string
A key to access the value. If provided, each field must have a unique key. See make for more information about accessing values.
label?
string |‌ false
A label describing the purpose of the field. Setting the label to false removes the element, which can be useful when nested as the only child within a group.
detail?
string
Additional information about the field, disclosed in a tooltip.
required?
boolean
Whether or not this field is required.
value?
Array<string>
The initial value of the field.
placeholder?
string
Add placeholder text to prompt the user when the field is empty.
spellcheck?
boolean
Enable or disable the browser’s spellchecking feature.
pattern?
string
A regular expression that the input value must match in order for the value to pass validation.
maxlength?
number
The maximum number of characters the user can enter into the input.

Output

Use these options when using the field with make.

label?
string |‌ false
A label describing the purpose of the field. Setting the label to false removes the element, which can be useful when nested as the only child within a group.
detail?
string
Additional information about the field, disclosed in a tooltip.
value?
Array<string>
The output value of the field.

Data

A list field will always return an array. If the value is null or undefined, an empty array is returned.