Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fa_html_dependency

Use a Font Awesome html_dependency


Description

The fa_html_dependency() function adds a html_dependency object into a Shiny or R Markdown context. This allows for the direct use of <i> tags that refer to Font Awesome icons without having to use the fa_i() to create these tags and also add the html_dependency to the document.

Usage

fa_html_dependency()

Details

The html_dependency object is created internally with the following invocation:

htmltools::htmlDependency(
  name = "font-awesome",
  version = fa_version,
  src = "fontawesome",
  package = "fontawesome",
  stylesheet = c("css/all.min.css", "css/v4-shims.min.css")
)

The fa_version object is an internal object that provides the released version number for the Font Awesome icons. This can be inspected by using fa_metadata()$version.

Value

An html_dependency object.

Examples

if (interactive()) {

# Create a Font Awesome `html_dependency`
fa_html_dependency()

}

fontawesome

Easily Work with 'Font Awesome' Icons

v0.2.1
MIT + file LICENSE
Authors
Richard Iannone [aut, cre] (<https://orcid.org/0000-0003-3925-190X>), Christophe Dervieux [ctb] (<https://orcid.org/0000-0003-4474-2498>), Winston Chang [ctb], Dave Gandy [ctb, cph] (Font-Awesome font), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.