Skip to content

Tagify

Tagify integrates the Tagify JavaScript library with Drupal. It turns entity reference and list fields into a tags input with autocomplete, drag to reorder, and optional extra information inside each tag. The same component is available for display, Views exposed filters, Facets, Link fields, and user references.

Features

  • Tagify widget for entity reference fields, with autocomplete, autocreate, cardinality limits, and drag to reorder.
  • Tagify Select widget for entity reference and list fields (list_integer, list_float, list_string), backed by the field's allowed values instead of an autocomplete request.
  • Info label: a second, token based value shown inside each tag, such as a vocabulary name, a thumbnail URL, or an icon.
  • Tagify formatter that renders referenced entities as tags on the front end.
  • Better Exposed Filters widgets for taxonomy and options based Views filters.
  • Hierarchical terms: optional parent selection and parent paths in the suggestions.
  • Gin and Claro styling, applied automatically.
  • CDN or local library: loads Tagify from cdnjs by default and switches to a local copy when one is present.

Submodules

Module What it adds
Tagify User List Widget and formatter for user references, with avatars.
Tagify AI Suggestions A "Get AI Suggestions" button that asks an AI provider which tags fit the content.
Tagify Facets A Tagify widget for Facets.
Tagify Link A Tagify widget for Link fields.
Tagify Icons / Tagify Iconify Icons Render icons in the info label.

How the pieces fit

flowchart LR
    subgraph Forms
        W[Tagify widget] --> E1[entity_autocomplete_tagify element]
        S[Tagify Select widget] --> E2[select_tagify element]
        BEF[BEF filters] --> E1
        BEF --> E2
    end
    E1 -->|typing| R["/tagify_autocomplete/..."]
    R --> M[tagify.autocomplete_matcher]
    M --> H[hook_tagify_autocomplete_match_alter]
    F[Tagify formatter] --> H
    E1 --> JS[Tagify.js]
    E2 --> JS