Iridium CMSIridium CMS

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:

  • defaultValuestring[]
    The default value to pre-populate the field. Defaults to [].
  • allowListstring[]
    A list of allowed tags. An empty list allows any tag. Defaults to [].
  • minnumber
    The minimum number of tags. Defaults to 0.
  • maxnumber
    The maximum number of tags. Defaults to Infinity.
  • minLengthnumber
    The minimum length of a tag. Defaults to 0.
  • maxLengthnumber
    The maximum length of a tag. Defaults to Infinity.
  • displayNamestring
    The display name of the field. Defaults to the name of the property.
  • requiredboolean
    Whether the field is required. Defaults to false.
  • searchableboolean
    Whether the field is searchable. Defaults to false.
  • filterableboolean
    Allows filtering the field. Defaults to false.
  • layoutLAYOUT
    The layout of the field in the admin. Defaults to LAYOUT.full.
  • placeholderstring
    The input placeholder text in the admin. Defaults to undefined.
  • patternRegExp
    A regular expression pattern that the tag value must match. Defaults to undefined.