【问题标题】:Using Font Awesome 5.7 icons in Shiny apps在 Shiny 应用程序中使用 Font Awesome 5.7 图标
【发布时间】:2021-01-09 01:39:31
【问题描述】:

Shiny 的icon() 功能仅支持 Font Awesome 4.7 图标。 A full list of the icons supported by Shiny can be found here.

从那时起,Font Awesome has been updated many times with new icons.如何在 Shiny 应用中使用 Font Awesome 5 图标,或者如何将 Shiny 中的 Font Awesome 升级到版本 5?

【问题讨论】:

    标签: r shiny font-awesome


    【解决方案1】:

    将以下行添加到您的 ui.r 文件中将扩展对 Font Awesome 5.7.2 图标的 Shiny 支持:

    tags$style("@import url(https://use.fontawesome.com/releases/v5.7.2/css/all.css);"),
    

    之后,您可以在 Shiny 网络应用程序中使用 icon("icon-name") 功能。例如,您可以使用icon("vote-yea") 检查这些新的 Font Awesome 图标是否按预期工作。

    【讨论】:

      猜你喜欢
      • 2021-02-02
      • 1970-01-01
      • 2018-12-15
      • 2013-01-22
      • 2016-11-13
      • 2013-10-21
      • 2015-09-02
      • 2020-08-17
      • 1970-01-01
      相关资源
      最近更新 更多