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.

Changing default prefix

See original GitHub issue

Is there anyway to change the default from solid to light or regular?

import { faCheckSquare, faCoffee } from '@fortawesome/fontawesome-pro-light'
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
fontawesome.library.add(brands, faCheckSquare, faCoffee)

I want to use <FontAwesomeIcon icon="coffee"/> instead of <FontAwesomeIcon icon={["fal","coffee"]}/>

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:14
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
corysimmonscommented, May 22, 2019

Both global and local settings would be the best implementation.

library.add(...icons, { default: 'fal' })

<FontAwesomeIcon icon="spinner-third" />
<FontAwesomeIcon icon="spinner-third" lib="fas" />

99% of the time I just use one icon set and just want to set it globally, but surely there will be people who have one-off icons.

Another solution would just be to get rid of the concept of a prefix and just make people do <FontAwesomeIcon icon="falSpinnerThird" />. This is almost always what I intuitively go to do before remembering there is some wacky prefix “helper” doing some “helping”. 😩

5reactions
IsenrichOcommented, Dec 19, 2018

Is there any intention of this feature being supported? This would be massively helpful and solve things for many users I’d imagine.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular2 how to change the default prefix of component to ...
My default component prefix is app-root for AppComponent. Now, when I change the selector to something else say "abc-root"
Read more >
Change Component Prefix in Angular | Bits and Pieces
In this approach we will change prefix using angular.json file. Go to the angular.json in the root of your project directory and change...
Read more >
Change prefix of component in angular application - Medium
Go to angular.json and see the prefix as app by default. see in below snapshot :- - change 'app' prefix to your prefix....
Read more >
Default Prefix - Autoconf - GNU.org
By default, configure sets the prefix for files it installs to /usr/local . The user of configure can select a different prefix using...
Read more >
Changing Prefix Of Angular Component - C# Corner
Go to angular.json where you will see the prefix as app by default. See in the below snapshot. Change ' ...
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