The Chip component is used to represent multiple complex entities in an input field as small blocks, such as contact information. A Chip may contain entities such as photo, title, text, rules, icons, or even a contact. This is useful to represent information in a compact way. The following basic example of the Chips component represents contact names in an order. By default, each entity can be deleted with the help of a cross icon or backspace keystroke:
<p-chips [(ngModel)]="contactnames" name="basic"></p-chips>
The following screenshot shows a snapshot result of the company contact names as a Chip example:
The Chip component supports two event callbacks named onAdd and onRemove. These event callbacks will be invoked when adding and removing Chips from the input box, respectively.