Font Awesome¶
Font Awesome is a library of over 50,0001 icons in several different styles, including over 400 icons for popular brands.
Usage¶
Font Awesome icons can be used via icons.fontawesome
or icons.fa
. There's no functional
difference between the two, but the latter is shorter, so it is preferred and is what will be used throughout
the rest of the documentation.
Each of Font Awesome's styles is available as a method of icons.fa
. To use an icon,
pass its name to the method of your desired style.
import RIL as icons
icons.fa.duotone.solid("envelope") # fa-duotone fa-solid fa-envelope
icons.fa.duotone.regular("wand-magic-sparkles") # fa-duotone fa-regular fa-wand-magic-sparkles
icons.fa.duotone.light("bomb") # fa-duotone fa-light fa-bomb
icons.fa.duotone.thin("camera-retro") # fa-duotone fa-thin fa-camera-retro
import RIL as icons
icons.fa.sharp_duotone.solid("music") # fa-sharp-duotone fa-solid fa-music
icons.fa.sharp_duotone.regular("comment") # fa-sharp-duotone fa-regular fa-comment
icons.fa.sharp_duotone.light("hippo") # fa-sharp-duotone fa-light fa-hippo
icons.fa.sharp_duotone.thin("calendar-days") # fa-sharp-duotone fa-thin fa-calendar-days
See Using a Kit for setup instructions.
The Classic Solid, Classic Regular, and Brands styles are available for free2; other styles require Font Awesome Pro.
Tip
Classic Solid is the component's default style and can also be used by calling icons.fa
directly:
Solid is also the default substyle for Sharp, Duotone, and Sharp Duotone:
-
Only just over 2,000 icons are free, though. The rest require Font Awesome Pro. ↩
-
Even within the Classic Solid and Classic Regular styles, some individual icons require Font Awesome Pro. The Brands style is completely free. ↩