@htmlbricks/hb-input-array-tags
v0.70.0
Published
Tag list as `{ id, label }` objects; add via free text or `params.availableTags` select; Bulma `tags` / `tag` / `delete`, `input`, `select`, `help is-danger`. Slot `add-tag-label`. Dispatches `setVal` with `{ value, valid, id }`.
Readme
hb-input-array-tags — input-array-tags
Category: inputs
Tags: inputs
What it does
Tag list stored as objects { id, label } (optional per-tag colorVarName); users add tags via free text or a dropdown from params.availableTags, with optional freeTag and _custom flow, removable Bulma tag + delete controls when allowRemove is set, and styling via params.colorVarName or the add-tag-label slot. Dispatches setVal with the array value, valid, and id.
Styling (Bulma)
Shadow bundle: form inputs/select/tools, elements/tag, elements/delete, elements/button. Tags use Bulma tags / tag; add control uses button.tag or styled tag.
Custom element
hb-input-array-tags
Attributes (snake_case; use string values in HTML)
id— optional stringstyle— optional stringschemaentry— required string (JSON:id,paramswithavailableTags?,freeTag?,allowRemove?,colorVarName?,addTagLabel?, optionalvalueas tag array)show_validation— optional"yes"|"no"
Events
setVal—{ value: string; valid: boolean; id: string }(tag list is serialized for the custom event payload)
Usage notes
Optional slot: add-tag-label for the add control label. CSS part: invalid-feedback.
Minimal HTML example
<hb-input-array-tags
schemaentry="{"id":"tags","params":{"freeTag":true,"allowRemove":true}}"
show_validation="no"
></hb-input-array-tags>