Chips requires an array as its model.
+A chip is customized using a template element where the value is passed as the implicit variable.
+Name | +Type | +Default | +Description | +
---|---|---|---|
value | +array | +null | +Value of the component. | +
disabled | +boolean | +false | +When present, it specifies that the element should be disabled. | +
max | +number | +null | +Maximum number of entries allowed. | +
Name | +Parameters | +Description | +
---|---|---|
input | +value: New value of the component | +Callback to invoke on input event of input field. | +
focus | +event: Browser event | +Callback to invoke when a input is focused. | +
blur | +event: Browser event | +Callback to invoke when a input loses focus. | +
add | +originalEvent: Browser event + value: Added item value |
+ Callback to invoke when a chip is added. | +
remove | +originalEvent: Browser event + value: Removed item value |
+ Callback to invoke when a chip is removed. | +
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-chips | +Container element | +
p-chips-token | +Chip element container. | +
p-chips-token-icon | +Icon of a chip. | +
p-chips-token-label | +label of a chip. | +
p-chips-input-token | +Container of input element. | +
None.
+