Open-source project
yairEO/tagify avatar
yairEO/tagify

Tagify is one component, and two of its caveats are struck through

🔖 lightweight, efficient Tags input component in Vanilla JS / React / Angular / Vue

3,889 stars444 forksHTMLNOASSERTION

At a glance

What is it?
Tagify takes an input element or a textarea and turns it into a tags component, published as a single package with framework bindings for React and Vue and a stylesheet you have to remember to include. The file is unusually honest in a literal sense: it keeps two earlier answers visible with a line through them, one about the logger flag and one about accessibility support.
Who is it for?
Tagify suits a form that needs a small tag input with suggestions, a whitelist and no component library, and suits a project that wants the same behaviour across frameworks from one dependency. It does not suit a project that needs accessible combobox semantics out of the box, since the accessibility claim is struck through with a stated reason.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 36 days ago.
What is it written in?
Mainly HTML, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 24, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • yairEO/tagify3,889 ★ · -6
Star history
Repository2026-09-242026-11-24
yairEO/tagify3.9k3.9k

-6 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

It transforms an existing element rather than replacing it

The component is described as transforming an input field or a textarea into a tags component, and the original element is what gets passed in, usually selected with a query on the document. One of the feature lines spells out the consequence that matters for forms: the original input or textarea values are kept in sync with the component, so whatever your form posts is still the value of an element your server already knows how to read. The whitelist is optional, and the file says why: it exists to suggest tags, not to restrict them, so a user can add anything unless you supply one. The whitelist accepts strings, numbers, or objects that must carry a value property, and that value is the one written into the input, while a separate setting decides what text the tag displays when the two should differ.

The stylesheet is a required step and the warning is in capitals

One line in the usage section is marked important and says not to forget to include the component stylesheet, which is the single most common way a first integration looks broken. Two paths are given for it, one to the built stylesheet in the distribution directory and one to the source stylesheet in the source directory, and a pull request is linked as a worked example of using the source form with a preprocessor. That second path is the theming story in miniature: the source file is published, so a project that wants the component to match its own variables compiles the stylesheet rather than overriding the built one. It also means the package ships its source, which is unusual for a component that describes itself as small in footprint.

The CDN route has an ordering rule and a version syntax

The distribution route is two lines, a script tag and a stylesheet link, and the instruction is specific about where they go: before any other code that uses, or will use, the component.

html
<script src="https://cdn.jsdelivr.net/npm/@yaireo/tagify"></script>
<link href="https://cdn.jsdelivr.net/npm/@yaireo/tagify/dist/tagify.css" rel="stylesheet" type="text/css" />

After that the component is available globally with no import statement. The version is selected with an at sign in the path, with an older release used as the example, so a project that pins a version pins both the script and the stylesheet in the same way. The alternative is the module route, one install command, which is what a project with a bundler would normally use. The file does not tell you which to pick, but the fact that the CDN route is listed first and given the ordering rule suggests it is aimed at the case where there is no build step at all.

Two answers are struck through, and the reasons are different

The features list and the debugging section each contain a line through a sentence, and neither deletion is silent. The debugging note originally said the internal warning logs only appear when an internal flag is enabled; that line is struck through and replaced with a global variable you can set to false to silence the default logging, which is a different and simpler mechanism. The accessibility line is struck through and annotated with the reason in parentheses: the component is too generic for any meaningful accessibility semantics. That second one is a design decision rather than a bug, and it is the item a reviewer of an accessibility checklist should look for before adopting the component, because the tags are not exposed as a combobox with proper roles and relationships.

Mix content, single value and read only are three modes

The mode set is what makes the component more than a string list. Mix content lets text and tags live together in the same field, which is how a mention or a hashtag input works. Single value turns it into something comparable to a select element, one value at a time. Read only can be applied to the whole component or to individual tags, and each tag can carry arbitrary properties such as classes or data attributes, so a caller can style or look up a tag by its own metadata. Creation is flexible too: a tag can be made by a regular expression delimiter, by pressing the enter key, or by leaving the field, and several values pasted with commas or newlines are split into several tags automatically. Duplicates are disallowed by default, and validation is either a pattern or a function you write.

Theming runs through templates, CSS variables and a truncation trick

There are three separate theming surfaces rather than one. The first is markup: the component renders its wrapper, its tags, its dropdown, the dropdown items, and the dropdown header and footer through templates you can override, so the structure is replaceable without patching the component. The second is behaviour in the dropdown: the suggestions list can be as wide as the whole component or sit next to the caret where you are typing, and individual suggestions can carry aliases so a fuzzy search matches on a different string than the one displayed. The third is the stylesheet, with a documented set of CSS variables for the dropdown and a longer list of variables for the preprocessor source. There is also a small trick worth knowing: a tag is truncated with an ellipsis by giving its element a maximum width in your own CSS.

Node 22, pnpm, gulp for the build and Playwright for the tests

The manifest pins the toolchain tightly, with Node 22 or newer and pnpm 10 or newer as engine requirements, and a browser support list that excludes one legacy engine and one mobile engine explicitly. The build is a task runner rather than a bundler configuration, with scripts for a development watch, a production build, and a version script that builds and then stages the output with git, so a release commits the built files as part of the version bump. Tests are run through Playwright with a configuration file at the root, and the served demo uses a one line static server. One inconsistency is visible in the same file: a test framework preset is still configured for a different browser automation library, which suggests the migration to the current runner is recent and the old configuration was left in place.

The export map is the real compatibility surface

The package publishes a dozen and a half entry points, and reading them is the fastest way to understand who this is for. The root entry resolves to one file for an import and a different one for a require, so a bundler gets the module build and a script tag gets the classic build. Then there are framework paths, several of which point at the source file for the React binding rather than a built artefact, and a pair of paths that exist to make a minified file importable by its name without the extension. The stylesheet and the preprocessor source are exported as entry points too, which is why the stylesheet can be imported rather than linked. Both the distribution directory and the source directory are published, so the source is available to anyone who wants to compile it, and the repository keeps a copy of that source as its main entry as well.

Editorial conclusion

Tagify suits a form that needs a small tag input with suggestions, a whitelist and no component library, and suits a project that wants the same behaviour across frameworks from one dependency. It does not suit a project that needs accessible combobox semantics out of the box, since the accessibility claim is struck through with a stated reason. Before wiring it in, include the stylesheet, decide whether you use the CDN route or the module route and do not mix them, and check the export path you import for your framework, since the map has more than a dozen entries for the same file.

Frequently asked questions

What is Tagify used for?

It transforms an input field or a textarea into a tags component, so a form field accepts a list of values as removable tags. It supports a whitelist for suggestions, mixed content where text and tags coexist, a single value mode, per site tagging, and it keeps the original input value in sync so your form still posts normally.

Is Tagify easy to learn?

The basic usage is a query for the input element and a constructor call with an optional whitelist, and the README points to many demos and a live sandbox. The component is published for vanilla JavaScript with React and Vue bindings, and the settings, events and hooks are each documented in their own section.

How do I use Tagify?

Install it as a module with npm i @yaireo/tagify --save, or load the script and stylesheet from a CDN, placing both before any other code that uses the component so it is available globally. Then import it, select the input or textarea, and pass it to the constructor, remembering to include the component stylesheet.

Why does it say Tagify is not defined?

The most common cause is load order: when using the CDN route the script and stylesheet must be placed before any other code that uses the component, otherwise nothing defines the global when your code runs. The other cause is forgetting the stylesheet, which makes the component render without styling rather than fail outright.

Official sources

  1. Issues
  2. Project website
  3. README
  4. Releases
  5. yairEO/tagify on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/yaireo-tagify.svg)](https://hysenlabs.com/projects/yaireo-tagify)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/yaireo-tagify.svg)](https://hysenlabs.com/projects/yaireo-tagify)

Was this useful?