tag
The tag
property is used to define a list of "tag" strings.
import { atom, tag } from '@iridiumcms/core';
export const sample = atom('sample', {
myTags: tag(),
});
Configuration
The text
field takes an optional configuration object with the following properties:
- defaultValueThe default value to pre-populate the field. Defaults to
string[]
[]
. - allowListA list of allowed tags. An empty list allows any tag. Defaults to
string[]
[]
. - minThe minimum number of tags. Defaults to
number
0
. - maxThe maximum number of tags. Defaults to
number
Infinity
. - minLengthThe minimum length of a tag. Defaults to
number
0
. - maxLengthThe maximum length of a tag. Defaults to
number
Infinity
. - displayNameThe display name of the field. Defaults to the name of the property.
string
- requiredWhether the field is required. Defaults to
boolean
false
. - searchableWhether the field is searchable. Defaults to
boolean
false
. - filterableAllows filtering the field. Defaults to
boolean
false
. - layoutThe layout of the field in the admin. Defaults to
LAYOUT
LAYOUT.full
. - placeholderThe input placeholder text in the admin. Defaults to
string
undefined
. - patternA regular expression pattern that the tag value must match. Defaults to
RegExp
undefined
.