Create an icon — icon

v1.7.4|Source: R/bootstrap.R


Create an icon for use within a page. Icons can appear on their own, inside of a button, and/or used with tabPanel() and navbarMenu().

icon(name, class = NULL, lib = "font-awesome", ...)



The name of the icon. A name from either Font Awesome (when lib="font-awesome") or Bootstrap Glyphicons (when lib="glyphicon") may be provided. Note that the "fa-" and "glyphicon-" prefixes should not appear in name (i.e., the "fa-calendar" icon should be referred to as "calendar"). A name of NULL may also be provided to get a raw <i> tag with no library attached to it.


Additional classes to customize the style of an icon (see the usage examples for details on supported styles).


The icon library to use. Either "font-awesome" or "glyphicon".


Arguments passed to the <i> tag of htmltools::tags.


An <i> (icon) HTML tag.

See also


# add an icon to a submit button
submitButton("Update View", icon = icon("redo"))

navbarPage("App Title",
  tabPanel("Plot", icon = icon("bar-chart-o")),
  tabPanel("Summary", icon = icon("list-alt")),
  tabPanel("Table", icon = icon("table"))