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 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery.tagify

v0.1.0

Published

A simple UI control to turn any text input into a "tagified" UI control. The value of the input will be split on the specified delimiter and create one tag for each item in the list.

Downloads

37

Readme

tagify Build Status

A simple UI control to turn any text input into a "tagified" UI control. The value of the input will be split on the specified delimiter and create one tag for each item in the list.

a simple tagify control

Installation

Include the jquery.tagify.js and jquery.tagify.css after you've included jQuery on the page.

<script src='/path/to/jquery.tagify.js'></script>
<link href='/path/to/jquery.tagify.css' rel="stylesheet" />

Usage

Create a tagified UI control:

$('#my_text_input').tagify();

Optionally you can pass to tagify an options object to control various aspects of tagify. The available options are:

	{
		//space delimited string of classes to add to tags (allows for custom styling of your tags)
		addClassToTag: '',

		//the delimiter the original input should be split on to create the tags
		delimiter: ',',

		//character codes that should trigger the "add" tag functions
		addNewDelimiter: [13, 44, 188, 32],

		//callback to be run immediately after a tag has been added
		addCb: $.noop,

		//callback to be run immediately after a tag has been removed 
		removeCb: $.noop,

		//callback to be run when a tag is found to be invalid.  Is passed the tag string, the tagify input jquery object,
		//and a force function that allows you to add the invalid tag (or a fixed up version of it) easily.
		//Example:
		//	function invalidCb (tag, $input, force) {
		//		//tag was found to be invalid because it has spaces (see inputValidation option),
		//		//fixup the tag and then force it's addition.  Note: you don't have to fix anything
		//		//up, you can simply call force(tag) to add the "invalid" tag based on the inputValidation
		//		//regex.
		//		tag = tag.replace(' ', '-');
		//		force(tag);   
		//	}
		invalidCb: $.noop,

		//the placeholder text for the tagify input
		placeholder: '',

		//a regex to validate tags against
		inputValidation: false,

		//button text for taggify button, if it's shown
		buttonText: 'go',

		//whether or not to show the button for the tagify input
		showButton: false,

		//should duplicate tags be removed?
		removeDupes: true,

		//preview puts the contents of the original input into the tagify input, useful for copying the string value that tagify is creating for you
		showPreviewIcon: false,

		//a title attribute for the preview icon
		previewTitle: 'Click to view the tag values as a string. Useful for copy / paste into other tagify inputs.'
		
		//if set to a number, only maxTagLimit amount of tags will be allowed.
		maxTagLimit: null,

		//used as placeholder text for the tagify input if the max tag limit is reached
		maxTagLimitMsg: 'Max tag limit reached.',

	};

API

reset - $input.tagify('reset');

Reset the tagified input to an empty state. Note: This will remove any tags, and empty the input generated by tagify, but it does not remove the instance from the node.

Examples (JSFiddle)

Show me a Tagify UI that has:

Author

Greg Goforth @ Decipher, Inc.

License

MIT

Summary

 project  : tagify
 repo age : 1 year, 9 months
 active   : 8 days
 commits  : 34
 files    : 18
 authors  :
    21	Greg Goforth            61.8%
    12	Christopher Hiller      35.3%
     1	sahilsk                 2.9%