I need list of all class name of Font-Awesome

前端 未结 18 3067
傲寒
傲寒 2020-12-12 13:44

I build app that will present a lot of icons so I need list of all Font-Awesome class name like [\"fa-dropbox\",\"fa-rocket\",\"fa-globe\", ....] so on is ther

18条回答
  •  星月不相逢
    2020-12-12 14:28

    https://pastebin.com/JNtUcwyM - Complete list of complete class names with labels for version 5.0.1

    if you retrieve a list of classes for a specific group you can add prefix and label then

    var icons = []
    brands.forEach(function(icon) {
          let element = {}
          element.className = "fab fa-" + icon;
          element.label = icon.replace(/-/g, ' ');
          icons.push(element);
    });
    
    console.log(JSON.stringify(icons))
    

提交回复
热议问题