How to add Font Awesome icons in your Retool Apps

This guide assumes:

  • You have some knowledge of HTML & CSS.
  • You have a subscription to Font Awesome’s pro plan: Font Awesome.
  • You are planning to use Font Awesome <i class="fa fa-unicorn"></i> tags to render the icons.
    When you are done, you’ll be able to add Font Awesome icons anywhere in your Retool apps where you can add HTML, like in text components and inside tables.


Steps

  1. Login to your FA account and download the Font Awesome package from the Get Started instantly With 1,000+ Free Icons | Font Awesome page.
  2. Create a public bucket on Amazon S3, Google Cloud Services, or similar provider.
  3. Host the font files in a publicly accessible folder.
  4. Open up the all.css file from the the /css folder that you downloaded from FA.
  5. Change the @font-face declarations to use the absolute paths to the publicly hosted font files in your S3 bucket instead of the provided relative paths [1].
  6. Copy and paste this entire CSS file into the Preloaded CSS section in the settings/advanced page of your Retool account.
  7. Use the style tags in your Retool app to display Font Awesome icons!

Footnote

[1]
For example, you’ll change the following relative path:
src: url("../webfonts/fa-brands-400.eot")
To the absolute path to your publicly hosted file:
src: url("https://your-bucket-name.s3-us-west-1.amazonaws.com/font-awesome/webfonts/fa-brands-400.eot");
Tip: To remove the tedium of the this step, you can do a find & replace for ../webfonts/ and replace it with the first part of the absolute path to your files. In the above example, it would be a find & replace for ../webfonts/ with https://your-bucket-name.s3.amazonaws.com/font-awesome/webfonts/.

2 Likes

In case anyone else finds this guide and dismisses because they don’t have a Pro plan… these steps also work with the free version of Font Awesome. Just download the self-hosted version.

Oh that’s great news, thanks for pointing that out @laurab! :100:

For anyone who may be looking for this in the future, as an alternative, you are now able to add the following line to your “Preloaded CSS” under Advanced Settings, to use a CDN hosted version of FontAwesome 5.

@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css)

2 Likes

Wow so much easier :sweat_smile:
thanks @mark :tada: