Add a custom icon to fontawesome

I’m trying to use a custom icon in the backend in a SelectBoxEditor.
Since v5 of FontAweSome adding custom icons to it is supported.

I’ve seen two approaches which both require access to a fontawesome instance as I understand this:

1st approach:

import fontawesome from '@fontawesome/fontawesome'
import { faSplat } from './InfoBox'

fontawesome.library.add(faSplat)

2nd approach:

import { library, dom } from "@fontawesome/fontawesome-svg-core";
import { faSplat } from './InfoBox'

library.add(faSplat);

dom.watch();

But I have no clue how to access @fontawesome

Can anyone help me there?

1 Like

I never tried that and I have never seen anyone doing that yet.
I’m not sure that works currently as we don’t expose the FontAwesome library via the Neos UI.

But it would need at least need to be a Neos UI plugin probably.

Hi,

I also did not use that right now. But would be nice to have that. If I am not wrong we already have an issue for that in the neos-ui. @jonnitto already requested that :wink:

BTW, welcome to discuss and thanks for the very first post :heart:

Thanks for the replies. :wink:

This is the us issue Markus mentioned: https://github.com/neos/neos-ui/issues/2370