

Every state


default


empty


focus


filled


duplicate


error


disabled
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| id | string | "project-tags" | Input id; the description and error ids hang off it. |
| name | string | "tags" | Form name of a hidden input with the tags, comma-separated. |
| label | string | "Tags" | Field label. |
| description | string | "Press Enter or a comma after each tag." | Line under the field; the count follows it. |
| placeholder | string | "Add a tag" | Placeholder while there is room for more tags. |
| defaultValue | string[] | ["research", "interviews"] | Tags to start with. |
| max | number | 5 | Most tags allowed; one more is refused with a message. |
| ignoreCase | boolean | true | Treat tags that differ only in case as duplicates. |
| onChange | (tags: string[]) => void | – | Called with the new list after every add or remove. |
| error | string | – | An error from outside (a server check), shown until the tags change. |
| disabled | boolean | – | Disables the field and the remove buttons. |
| className | string | – | Extra classes on the field. |


