This doesn t mean icons need to be 16px if your content font size is also 16px.
Mat icon next to text.
For example mat icon home mat icon displays home icon.
Whats the correct way of placing an icon next to text.
A telephone icon next to a phone number.
Mat icons used as a matprefix or matsuffix should vertically align with the input text placeholder.
Hi guys what is the correct code to use when placing an icon next to a piece of text.
I have tried various ways but the text and icon are never horizontally aligned.
Mat icon is part of angular material module called maticonmodule we can use font ligature as an icon by putting the ligature text in mat icon component.
Import maticonmodule from angular material icon.
We have to import maticonmodule from angular material modules.
To add the icon to mat button text we need to add mat icon before the text of button as shown below h3 mat button with icon and text h3 button mat raised button color primary mat icon shopping cart mat icon add to cart button.
Icons are positioned too high.
I class material icons vertical align middle chevron left i div class inline block padding bottom 3 previous div.
What is the current behavior.
Icons ought to be treated a lot like typography.
Surprisingly it added padding to both the icon and the div.
Download on desktop to use them in your digital products for android ios and web.
What is the expected behavior.
Codepen and steps to reproduce the issue.
That seems broken to me as the icon is outside of the div.
Icons material icons are delightful beautifully crafted symbols for common actions and items.