Sagar Bahadur Tamang
Sagar Bahadur Tamang

Reputation: 2709

How to get all the icons from the fontawesome js library?

I have included the font-awesome v5.12.1 library via CDN. Now, I want to get the list of icons or icon text to display as a select option. Is there any way to get the list of icons from the font-awesome js library as array so that I can display as dropdown.

Upvotes: 4

Views: 5355

Answers (1)

MBaas
MBaas

Reputation: 7530

I use their archive which has a file metadata/icons.json which provides that (and other useful) info and I've then used Datatables to build something similar to their list. I'm not sure if this file can also be taken from CDN, but you may want to try https://github.com/FortAwesome/Font-Awesome/blob/master/metadata/icons.json for the latest. (Caveat: could be different from CDN)

You may also want to check out this question and its answers which may help.

Upvotes: 3

Related Questions