question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why is the default prefix for solid ("fas") rather than regular ("far")?

See original GitHub issue

When passing a string as the value of icon the default prefix is hardcoded for the solid font (“fas”).

Why not default the prefix to the regular font (“far”)?

Using the Font Awesome Regular this doesn’t work:

<FontAwesomeIcon icon='circle' />

Instead I have to do this:

<FontAwesomeIcon icon={['far', 'circle']} />

Seems that the default should be “far” and that if a user wants to use the solid, light, or brand fonts that they should have to pass a prefix.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
silvinodemedeiroscommented, Nov 6, 2018

Anyone can confirm or link to something that says whats in op? That this is the RIGHT way to do it:

<FontAwesomeIcon icon={[‘far’, ‘circle’]} />

It don’t work for me.

It doesn’t work for me either

EDIT: I got it to work after installing the /free-regular-svg-icons and importing it as required in App.js. The thing is, and it might confuse people as it confused me, the regular style is listed in the React documentation as a Pro feature. Only solid styled icons are listed as free icons.

2reactions
robmadolecommented, Oct 25, 2018

@mikael1000 <FontAwesomeIcon icon={['far', 'circle']} /> is the correct way.

@PhilipsEkuma can you provide a reproduction we can take a look at?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Font-Awesome icon class is different - Stack Overflow
The new default is the fas solid style and the fab style for brands. 'fa' alone means font awesome.
Read more >
Basic Use | Font Awesome Docs
The fa prefix has been deprecated in version 5. The new default is the fas solid style and the fab style for brands....
Read more >
How To Use Font Awesome icons in Angular Applications
The default icon style in Font Awesome is 'fas' i.e., font awesome ... To use regular icons use the prefix 'far' ... Regular...
Read more >
How To Use Font Awesome 5 with React - DigitalOcean
Solid Style - fas; Regular Style - far; Light Style - fal; Duotone Style - fad. You can search for a specific type...
Read more >
Font Awesome 5 Intro - W3Schools
New in Font Awesome 5 is the fas prefix, Font Awesome 4 uses fa . The s in fas stands for solid, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found