Last chance! 50% off unlimited learning
Sale ends in
Create an icon for use within a page. Icons can appear on their own, inside
of a button, or as an icon for a tabPanel()
within a
navbarPage()
.
icon(name, class = NULL, lib = "font-awesome", ...)
Name of icon. Icons are drawn from the Font Awesome Free (currently icons from the v5.13.0 set are supported with the v4 naming convention) and Glyphicons libraries. Note that the "fa-" and "glyphicon-" prefixes should not be used in icon names (i.e. the "fa-calendar" icon should be referred to as "calendar")
Additional classes to customize the style of the icon (see the usage examples for details on supported styles).
Icon library to use ("font-awesome" or "glyphicon")
Arguments passed to the <i>
tag of htmltools::tags
An icon element
For lists of available icons, see https://fontawesome.com/icons and https://getbootstrap.com/components/#glyphicons.
# NOT RUN {
# add an icon to a submit button
submitButton("Update View", icon = icon("refresh"))
navbarPage("App Title",
tabPanel("Plot", icon = icon("bar-chart-o")),
tabPanel("Summary", icon = icon("list-alt")),
tabPanel("Table", icon = icon("table"))
)
# }
Run the code above in your browser using DataLab