BuzzForm
BuzzFormDocs

Tags Field

Chip-based multi-value string input.

Tags Field

The tags field renders a tag/chip input for entering multiple string values.

Schema Properties

Prop

Type

UI Options

OptionTypeDefaultDescription
delimitersarray["enter"]Keys that create a new tag
variant"chips" | "pills" | "inline""chips"Visual variant for tag chips
copyablebooleanfalseShow a copy all button
labelsobject-Text and label overrides
labels.countReactNode"{count} / {max} tags"Custom text for tag count
classNamestring-CSS class applied to the container
widthstring | number-Inline width applied to the field

React Overrides: The label, description, and ui.labels.count properties all support ReactNode (JSX) when importing defineSchema from @buildnbuzz/form-react.

Basic Usage

const schema = defineSchema({
  fields: [
    {
      type: "tags",
      name: "skills",
      label: "Skills",
      required: true,
      minTags: 3,
      maxTags: 10,
    },
  ],
});

Examples

With Max Tag Length

{
  type: "tags",
  name: "tags",
  label: "Tags",
  maxTagLength: 20,
  description: "Directly restricts input length per tag",
}

Allow Duplicates

{
  type: "tags",
  name: "emails",
  label: "Email Addresses",
  allowDuplicates: true,
}

Email Tags

{
  type: "tags",
  name: "recipients",
  label: "Recipients",
  minTags: 1,
  maxTags: 10,
  description: "Press Enter to add each email",
}

Auto-Derived Validators

PropertyValidator
required: truerequired
minTagsminTags
maxTagsmaxTags

On this page