- When should icons include a text label?
- How do I align text and icon on same line?
- Why use icons instead of text?
- How do I make text and icons on the same line in tailwind?
When should icons include a text label?
To help overcome the ambiguity that almost all icons face, a text label must be present alongside an icon to clarify its meaning.
How do I align text and icon on same line?
If you want to make a text appear vertically aligned next to a Font Awesome icon, you can use the CSS vertical-align property set to “middle” and also, specify the line-height property. Change the size of the icon with the font-size property.
Why use icons instead of text?
Icons can save space over text, but at the price of recognition. For small icons, such as 16x16 pixel, it's very difficult for users to even recognize what they are supposed to be a picture of, let alone what the picture is supposed to stand for. One user I know thought the “disk” icon for save was a picture of a TV.
How do I make text and icons on the same line in tailwind?
Wrap both the title and the icon in a div with the class flex . This way they will be placed on the same line. You can also add justify-between to move the icon to the right corner.