@anguless/angulux/chip
chip
1 declarations3 demos
import
import { ChipModule } from '@anguless/angulux/chip';Basic
A chip displays its label.
Action
<agl-chip label="Action" />Icon
An icon is shown before the label with the icon property.
Apple
Facebook
Google
<agl-chip label="Apple" icon="pi pi-apple" /><agl-chip label="Facebook" icon="pi pi-facebook" /><agl-chip label="Google" icon="pi pi-google" />Removable
A removable chip gains a control that takes it out of the DOM.
Action
Comedy
<agl-chip label="Action" [removable]="true" /><agl-chip label="Comedy" icon="pi pi-star" [removable]="true" />API
Generated from the committed corpus, which check:corpus holds to the built library.
Chip
componentagl-chipChip represents people using icons, labels and images.
| Input | Type | Default | Description |
|---|---|---|---|
| label | string | undefined | not documented | Defines the text to display. |
| icon | string | undefined | not documented | Defines the icon to display. |
| image | string | undefined | not documented | Defines the image to display. |
| alt | string | undefined | not documented | Alt attribute of the image. |
| styleClass deprecated — since v20.0.0, use `class` instead. | string | undefined | not documented | Class of the element. |
| disabled | boolean | undefined | not documented | When present, it specifies that the element should be disabled. |
| removable | boolean | undefined | not documented | Whether to display a remove icon. |
| removeIcon | string | undefined | not documented | Icon of the remove element. |
| chipProps | ChipProps | undefined | not documented | Used to pass all properties of the chipProps to the Chip component. |
| Output | Type | Description |
|---|---|---|
| onRemove | EventEmitter<MouseEvent> | Callback to invoke when a chip is removed. |
| onImageError | EventEmitter<Event> | This event is triggered if an error occurs while loading an image file. |
| Template slot | Description |
|---|---|
| <ng-template #removeicon> | Custom remove icon template. |
Inherited from BaseComponent
inherited| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | undefined | undefined | Used to pass attributes to DOM elements inside the component. TRUSTED INPUT ONLY. Whatever you put here is applied to the DOM as given: keys become attributes, and a key that names a DOM property is assigned to that property directly, with no sanitizer in between. That is what makes the API useful, and it means a value reaching it from a user, a database or a CMS can execute script. Treat it like markup you wrote yourself, not like data you received. |
| ptOptions | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |