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

ngx-tags-input-box

v3.1.9

Published

A tags input is a UI component which allows the user to insert multiple entries as tags into an input field. Also known as Tagging/Tokenizing system. You can find this system on most major websites.

Downloads

538

Readme

Welcome to NGX-TAGS-INPUT-BOX!

For Angular 17 + (standalone component)

ngx-tags-input-box npm version ngx-tags-input-box

Tags input component for angular projects (Also supports angular upto date) Creative tags input with multiple color variance and limitable tag range.

Ability to pass default values on tags initialization and add custom themes with css.



Import

Import the module on your your-component.component.ts file as follow.

import { NgxTagsComponent } from 'ngx-tags-input-box';

Then import the module as follow on imports array

@Component({
  selector: '...',
  templateUrl: '...',
  styleUrls: ['...'],
  standalone: true,
  imports: [NgxTagsComponent]
})

Add this into your .html file of your component

<div>
  <ngx-tags-input [limit]="10" [placeholder]="'Add Tags...'" [mode]="'success'" [tags]="tags" [rounded]="rounded" [distinct]="true" [disabled]="disabled" (tagsChange)="displayTags($event)"></ngx-tags-input>
</div>
<div>
  <ngx-tags-input [limit]="10" [placeholder]="'Add Tags...'" [mode]="'primary'" [tags]="tags" [rounded]="rounded"
    [distinct]="true" [disabled]="disabled" (tagsChange)="displayTags($event)"></ngx-tags-input>
</div>
<div>
  <ngx-tags-input [limit]="10" [placeholder]="'Add Tags...'" [mode]="'info'" [tags]="tags" [rounded]="rounded"
   [distinct]="true"  [disabled]="disabled" (tagsChange)="displayTags($event)"></ngx-tags-input>
</div>
<div>
  <ngx-tags-input [limit]="10" [placeholder]="'Add Tags...'" [mode]="'warning'" [tags]="tags" [rounded]="rounded"
   [distinct]="true"  [disabled]="disabled" (tagsChange)="displayTags($event)"></ngx-tags-input>
</div>
<div>
  <ngx-tags-input [limit]="10" [placeholder]="'Add Tags...'" [mode]="'danger'" [tags]="tags" [rounded]="rounded"
   [distinct]="true"  [disabled]="disabled" (tagsChange)="displayTags($event)"></ngx-tags-input>
</div>
<div>
  <ngx-tags-input [limit]="10" [placeholder]="'Add Tags...'" [mode]="'light'" [tags]="tags" [rounded]="rounded"
   [distinct]="true"  [disabled]="disabled" (tagsChange)="displayTags($event)"></ngx-tags-input>
</div>

Add this into to your .ts file of your component

public tags: any[] = ['welcome', 'to', 'ngx-tags-input']; // Bind Custom Input

public displayTags(event) { // Your code goes here }

Custom css

.ngx-tags-custom-css { // Your styles go here }

Add css for above css class in order to modify the input.

Inputs & Variants

This are the methods available with ngx-tags-input-box use it as per your requirement:

  • mode: (required) value should be primary | success | danger | info | warning | light

  • limit: (required) value should be 0 - n (default 25)

  • placeholder: (required) value should be any text...

  • header: (optional) value should be any text...

  • tags: (optional) tags [1,2,3,4,5,6] array in order to pass value.

  • rounded: true (or) false

  • disabled: true (or) false

  • distinct: true - do not allow duplicate

Code integration

To use this package as a service npm i ngx-tags-input-box install this on the root angular project .

Using

After importing this library with npm install ngx-tags-input-box, go to the component which is declared under app.module.ts and integrate as below.

Note: Don't forget to run this commend npm i ngx-tags-input-box on root folder or else it will throw error.