Import
Basic Usage
API Reference
MatChip
Selector:mat-chip, [mat-chip], mat-basic-chip, [mat-basic-chip]
Exported as: matChip
Properties
| Name | Type | Description |
|---|---|---|
@Input() id | string | Unique ID for the chip |
@Input() value | any | Value of the chip |
@Input() color | string | Theme color |
@Input() removable | boolean | Whether chip displays remove styling. Default: true |
@Input() highlighted | boolean | Colors chip for emphasis |
@Input() disableRipple | boolean | Whether ripples are disabled |
@Input() disabled | boolean | Whether the chip is disabled |
@Input() role | string | Role for the root element |
@Input() aria-label | string | ARIA label for content |
@Input() aria-description | string | ARIA description |
@Output() removed | EventEmitter<MatChipEvent> | Emitted when chip is to be removed |
@Output() destroyed | EventEmitter<MatChipEvent> | Emitted when chip is destroyed |
Methods
| Name | Description |
|---|---|
focus(): void | Focuses the chip |
remove(): void | Allows programmatic removal of the chip |
Content Slots
| Selector | Description |
|---|---|
matChipAvatar | Leading icon for the chip |
matChipTrailingIcon | Trailing icon |
matChipRemove | Remove button |
Examples
With Icons
Removable Chips
Chip List with Input
Disabled Chips
Highlighted Chips
Accessibility
- Chips have appropriate ARIA roles based on usage
- Use
aria-labeloraria-descriptionfor screen readers - Remove button is keyboard accessible
- Backspace/Delete keys trigger chip removal