2016-09-11 11:00:49 +00:00
---
2017-07-29 12:02:00 +00:00
title: Icon
2016-09-11 11:00:49 +00:00
layout: documentation
doc-tab: elements
doc-subtab: icon
2017-07-28 21:57:51 +00:00
variables:
- name: $icon-dimensions
value: 1.5rem
- name: $icon-dimensions-small
value: 1rem
- name: $icon-dimensions-medium
value: 2rem
- name: $icon-dimensions-large
value: 3rem
2016-09-11 11:00:49 +00:00
---
2017-07-28 21:57:51 +00:00
{% capture icon_example %}
< span class = "icon" >
< i class = "fa fa-home" > < / i >
< / span >
{% endcapture %}
2016-09-11 11:00:49 +00:00
{% include subnav-elements.html %}
< section class = "section" >
< div class = "container" >
< h1 class = "title" > Icons< / h1 >
< h2 class = "subtitle" >
Bulma is compatible with < strong > < a href = "http://fortawesome.github.io/Font-Awesome/" > Font Awesome< / a > < / strong > icons.
< / h2 >
2017-07-29 12:02:00 +00:00
{%
include meta.html
colors=false
sizes=true
variables=true
%}
2016-09-11 11:00:49 +00:00
< hr >
< div class = "content" >
2016-10-30 16:11:04 +00:00
< p > Because the icons can take a few seconds to load, and because you want control over the < strong > space< / strong > the icons will take, you can use the < code > icon< / code > class as a container:< / p >
2016-09-11 11:00:49 +00:00
< / div >
2017-08-14 11:44:24 +00:00
< div class = "bd-example" >
2016-12-22 18:17:26 +00:00
{{icon_example}}
2016-09-11 11:00:49 +00:00
< / div >
2017-07-28 21:57:51 +00:00
{% highlight html %}{{icon_example}}{% endhighlight %}
2016-09-11 11:00:49 +00:00
< div class = "content" >
2016-10-30 16:11:04 +00:00
< p > The < code > icon< / code > container will take up < em > exactly< / em > < strong > 1.5rem x 1.5rem< / strong > . The icon itself is sized at < strong > 21px< / strong > .< / p >
2016-09-11 11:00:49 +00:00
< / div >
2017-08-14 17:25:14 +00:00
{% include anchor.html name="Sizes" %}
2016-09-11 11:00:49 +00:00
< div class = "content" >
< p > Font Awesome icons use a font-size of < strong > 28px< / strong > by default, and are best rendered when using < strong > multiples of 7< / strong > .< / p >
< p > The Bulma < code > icon< / code > container is always slightly bigger than the font-size used:< / p >
< / div >
< table class = "table" >
< thead >
< tr >
< th colspan = "2" > Class< / th >
< th > Font-size< / th >
< th > Container size< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > < code > icon is-small< / code > < / td >
< td > < span class = "icon is-small" > < i class = "fa fa-home" > < / i > < / span > < / td >
< td > 14px< / td >
2016-10-30 16:11:04 +00:00
< td > 1rem x 1rem< / td >
2016-09-11 11:00:49 +00:00
< / tr >
< tr >
< td > < code > icon< / code > < / td >
< td > < span class = "icon" > < i class = "fa fa-home" > < / i > < / span > < / td >
< td > 21px< / td >
2016-10-30 16:11:04 +00:00
< td > 1.5rem x 1.5rem< / td >
2016-09-11 11:00:49 +00:00
< / tr >
< tr >
< td > < code > icon is-medium< / code > < / td >
< td > < span class = "icon is-medium" > < i class = "fa fa-home" > < / i > < / span > < / td >
< td > 28px< / td >
2016-10-30 16:11:04 +00:00
< td > 2rem x 2rem< / td >
2016-09-11 11:00:49 +00:00
< / tr >
< tr >
< td > < code > icon is-large< / code > < / td >
< td > < span class = "icon is-large" > < i class = "fa fa-home" > < / i > < / span > < / td >
< td > 42px< / td >
2016-10-30 16:11:04 +00:00
< td > 3rem x 3rem< / td >
2016-09-11 11:00:49 +00:00
< / tr >
< / tbody >
< / table >
2017-07-28 21:57:51 +00:00
{% include variables.html %}
2016-09-11 11:00:49 +00:00
< / div >
< / section >