-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Documentation Feedback
The documentation for MatChip states the following:
You can add two additional icons to an individual chip. A chip has two slots to display icons using content projection. All variants of chips support adding icons including <mat-chip>, <mat-chip-option>, and <mat-chip-row>.
This suggests two possible slots for a <mat-icon>
(leading or trailing the chip text). However, this doesn't work in practice, and looking at the template code suggests that the chip only supports an avatar in the leading slot (despite the documentation stating "icon").
When you try to add an icon rather than an avatar, it's not aligned correctly. Adding the matChipAvatar
directive doesn't help as the icon is clipped to a circle (and the alignment is still off).
In my opinion, a chip should support projecting an instance of MatIcon
on the leading side (in fact, it's show in the MD spec). However, as it stands the documentation is misleading as to the current behaviour.
