| Title: | 'Font Awesome' Icons as 'shiny' 'favicons' |
|---|---|
| Description: | Easily use 'Font Awesome' icons as 'shiny' 'favicons' (the icons that appear on browser tabs). 'Font Awesome' (<https://fontawesome.com/>) is a popular set of icons that can be used in web pages. 'favawesome' provides a simple way to use these icons as 'favicons' in 'shiny' applications and other HTML pages. |
| Authors: | Jon Harmon [aut, cre, cph] (ORCID: <https://orcid.org/0000-0003-4781-4346>) |
| Maintainer: | Jon Harmon <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1.9000 |
| Built: | 2026-05-24 06:23:10 UTC |
| Source: | https://github.com/shinyworks/favawesome |
Generate the html necessary to use a Font Awesome icon as the favicon (the icon that appears on browser tabs) for a shiny app or other HTML document.
fav(name, ...)fav(name, ...)
name |
The name of the Font Awesome icon. This could be as a short name
(e.g., |
... |
Arguments passed on to
|
A shiny.tag (see htmltools::tag()) that can be used to embed a
favicon in a shiny app or other HTML document.
html_page <- htmltools::tags$html( fav("earth-africa", fill = "blue"), htmltools::tags$body( htmltools::tags$h1("Hello world!"), htmltools::tags$p("(on the browser tab)") ) ) htmltools::html_print(html_page, viewer = utils::browseURL)html_page <- htmltools::tags$html( fav("earth-africa", fill = "blue"), htmltools::tags$body( htmltools::tags$h1("Hello world!"), htmltools::tags$p("(on the browser tab)") ) ) htmltools::html_print(html_page, viewer = utils::browseURL)
If you can't import favawesome in your project, you can still use a Font
Awesome (https://fontawesome.com) icon as the favicon (the icon that
appears on browser tabs). Calling this function will download the necessary
code to add a favawesome_icon() function to your project, and will ovewrite
the existing file if it already exists, making it easy to update the code.
The favawesome_icon() function takes the same arguments as fav().
use_favawesome_standalone()use_favawesome_standalone()
NULL invisibly (called for side effect of importing the
favawesome_icon() definition). favawesome_icon() returns the same value
as fav().