Icons
Using icons
Important! Make sure to have the Styles / Global component on each page to display the icons. This symbol contains a necessary code snippet used to display Boxicons in Webflow and on published pages.
Inserting icons into Webflow
- Go to Boxicons website at www.boxicons.com
- Search for the icon you want to use
- Select the icon by clicking on your desired icon and then change the active tab from Web Component to Font
- Copy the <i> tag by clicking on the code snippet. This should automatically copy the code snippet to your clipboard
- Go to Webflow and place a custom embed element from the Add Elements panel
- Paste your code snippet into the custom embed element
- Apply a class of "icon" to the custom embed element
- Apply necessary combo classes such as text-size or text-color to your icon embed
- Enjoy your new custom Boxicon
Try it out
Select the icon below and add a new icon using the method above.
Icon Class
line-height: 1;
About the icon class
The icon class is a universal class used to designate something as an icon. It is meant to be placed onto custom code embeds with icon code placed inside.
The class resets the display property on the embed from block to inline-block and also resets the line-height property to maintain a 1:1 aspect ratio in relation to the font size.
Icon Utilities
About icon utilities
The icon class comes with a set of utilities taken from the typography system. Since these icons are rendered out as typography, the same type utility classes can also be applied to icons as well through combo classes.
For our example here, we have the text-color and text-size classes applied to the icons. In the examples above you can see how each icon is rendered out as a font and how its behavior is similar to normal text elements.