Back

TagsInput

Default

Press Enter or comma to add a tag

With Max (3 tags)

Error state

Please add at least 2 tags

Disabled

Usage

@forms.TagsInput(forms.TagsInputProps{
    ID:          "tags",
    Name:        "tags",        // hidden input; value = comma-joined list
    Label:       "Technologies",
    Placeholder: "Add a tag…",
    Tags:        []string{"Go", "Templ"}, // initial tags
    MaxTags:     5,             // 0 = unlimited
    Hint:        "Press Enter or comma to add",
    Error:       "",
})