npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ember-tags-input

v0.3.0

Published

Simple Ember addon for entering tags.

Downloads

57

Readme

ember-tags-input

Demo

ember-tags-input is a simple Ember addon that converts a user's typing into tags. New tags are created when the user types a comma, space, semi colon or hits the enter key. Tags can be removed using the backspace key or by clicking the x button on each tag. Tags can be edited by click on existing tag.

Installation

ember install ember-tags-input

Add imports to ember-cli-build.js file for using the default styles

app.import('node_modules/ember-tags-input/vendor/styles/eti-svg-icons.css');
app.import('node_modules/ember-tags-input/vendor/styles/ember-tags-input.css');

Usage

In the simplest case, just pass a list of tags to render and actions for adding and removing tags. The component will never change the tags list for you, it will instead call actions when changes need to be made. The component will yield each tag in the list, allowing you to render it as you wish.

{{#ember-tags-input
   tagsData=tags
   onAddTag=(action addTag)
   onAddTags=(action addTags)
   onReplaceTagAtIndex=(action replaceTagAtIndex)
   onReplaceTagWithTagsAtIndex=(action replaceTagWithTagsAtIndex)
   onRemoveTagAtIndex=(action removeTagAtIndex)
   as |tagLabel|
}}
  {{tagLabel}}
{{/ember-tags-input}}
import Controller from '@ember/controller';

export default Controller.extend({
  tags: null,

  init() {
    this._super(...arguments);

    this.set('tags', ['tag-1', 'tag-2', 'tag-3']);
  },

  addTag(newTag) {
    this.get('tags').addObject(newTag);
  },

  addTags(newTags) {
    this.get('tags').addObject(newTags);
  },

  replaceTagAtIndex(tag, index) {
    this.get('tags').replace(index, 1, [tag]);
  },

  replaceTagWithTagsAtIndex(tags, index) {
    this.get('tags').replace(index, 1, tags);
  },

  removeTagAtIndex(index) {
    this.get('tags').removeAt(index);
  }
});

Options

tags

  • An array of tags to render.
  • default: null

readOnly

  • If a read only view of the tags should be displayed. If enabled, existing tags can't be edited or removed and new tags can't be added.
  • default: false

isEditTagsModeEnabled

  • Enables tags edit mode.
  • default: true

tagRemoveButtonSvgId

  • String of svg id for tag remove button.
  • default: null

editTagInputPlaceholder

  • The edit tag placeholder text to display when the user hasn't typed anything.
  • default: 'Enter a tag...'

newTagInputPlaceholder

  • The new tag placeholder text to display when the user hasn't typed anything.
  • default: 'Add a tag...'

editTagInputMaxLength

  • The max length of text which can be entered to the edit tag input.
  • default: 'Enter a tag...'

newTagInputMaxLength

  • The max length of text which can be entered to the new tag input.
  • default: 'Add a tag...'

isAutoNewInputWidthEnabled

  • Enables auto width for new tag input.
  • default: true

isAutoEditInputWidthEnabled

  • Enables auto width for edit tag input.
  • default: true

showRemoveButtons

  • If 'x' removal links should be displayed at the right side of each tag.
  • default: true

Actions

onAddTag

Action which occurs when tag should be added.

onAddTags

Action which occurs when tags should be added.

onReplaceTagAtIndex

Action which occurs when tag should be replaced with a new tag.

onReplaceTagWithTagsAtIndex

Action which occurs when tag should be replaced with several new tags.

onRemoveTagAtIndex

Action which occurs when tag should be removed.