Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A fully-featured, accessible tag input component for React built on Shadcn UI, supporting autocomplete, validation, and drag-and-drop.
Emblor is an open-source tag input component for React built on Shadcn UI, combining autocomplete, validation, drag-and-drop, and accessibility features into a single drop-in component.
Emblor is a highly customizable tag input component for React, created by JaleelB and distributed as an npm package. It consumes an array of tags (each an object with an id and text) and renders an input field with tag chips, supporting autocomplete suggestions, validation rules, and drag-and-drop reordering. It outputs the updated tag list through a setTags callback and emits events like onTagAdd, onTagRemove, and onTagClick. The component is built on top of Shadcn UI's Input, Popover, Command, and Dialog components, making it consistent with Shadcn-based design systems.
autocompleteOptions list and a custom autocompleteFilter function.maxTags, minTags, minLength, maxLength, and a custom validateTag predicate; allowDuplicates controls repeated tags.draggable to true to let users reorder tags using their pointer; works with the sortable tag list.customTagRenderer to fully control each tag's markup, or use styleClasses to theme every sub-component (input, tag body, close button, autocomplete, popover).delimiterList, and tags are automatically added when pasting text.setTags callback pairs directly with setValue in a controlled form.inputFieldPosition), display tags in a popover (usePopoverForTags), or show a tag count with showCount.setTags to sync state and onSubmit to send structured tag data.maxTags limits, delimiterList, and drag-and-drop reordering.readOnly, or a clearable input with clearAll and onClearAll.Install the package with pnpm add emblor, then import Tag and TagInput into a React component. Pass the current tags array and a setTags state setter, configure optional props for autocomplete, validation, and layout, and handle the returned tag list through callbacks. The component renders the input and tag list, adding tags on delimiter/Enter, removing on close-button click, and reordering when draggable is enabled.
Yes, Emblor is an open-source component published on npm and hosted on GitHub, so it can be freely installed and used in any project.
Emblor requires React, Shadcn UI's Input, Popover, Command, and Dialog components, Tailwind CSS, tailwind-merge, and clsx. The usage example also uses React Hook Form and Zod, but those are only needed for the form integration sample.
Yes, you can pass a customTagRenderer to render each tag as any React element, or use the styleClasses prop to apply custom Tailwind classes to the input, tag body, close button, autocomplete, and popover sub-components.
By default duplicates are disallowed. Set the allowDuplicates prop to true to let users add the same tag more than once.
