| fa_i {fontawesome} | R Documentation |
Generate a Font Awesome <i> tag
Description
The fa_i() function creates a Font Awesome <i> tag and not an SVG as with
fa(). The primary use case for fa_i() is for legacy Shiny applications
that use the shiny::icon() function. This function is called within a
shiny::icon() call and all HTML dependencies to support icon generation are
hosted in the fontawesome package.
Usage
fa_i(
name,
class = NULL,
...,
prefer_type = c("regular", "solid"),
html_dependency = fa_html_dependency()
)
Arguments
name |
The name of the Font Awesome icon. This could be as a short name
(e.g., |
class |
Additional classes to customize the style of the icon. |
... |
Arguments passed to the |
prefer_type |
Chooses the type of icon returned if: (1) providing a
short name, and (2) that icon has both solid and regular types.
For example, using |
html_dependency |
Provides an opportunity to use a custom
|
Value
An icon element.
Examples
if (interactive()) {
# Create a Font Awesome icon object
fa_i(name = "r-project")
}