Files
shiny/man/icon.Rd
Alan Dipert 3cea5fb2d0 Upgrade FontAwesome to 5.3.1 (#2186)
* Upgrade FontAwesome to 5.3.1

- Upgrades FontAwesome to a new major (breaking) version, but
  is backwards compatible because we include the v4-shims CSS that maps
  old names to new.
- This is a step toward full V5 adoption that doesn't require us to
  come up with a plan for deprecating V4 icon names.
- Details: https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4
- Related to #2156 and #1966

* Improvements to icon

- Clarify in docs that fontawesome V5 icons accessible with V4-style names
- Make icons browseable: icon('address-book') will now open the Viewer
  pane of RStudio IDE so that icons can be experimented with more easily.

* Update LICENSE with CC for FontAwesome .svgs

* Update NEWS
2018-09-18 13:30:14 -07:00

51 lines
1.6 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bootstrap.R
\name{icon}
\alias{icon}
\title{Create an icon}
\usage{
icon(name, class = NULL, lib = "font-awesome")
}
\arguments{
\item{name}{Name of icon. Icons are drawn from the
\href{https://fontawesome.com/}{Font Awesome} (currently icons from
the v5.3.1 set are supported) and
\href{http://getbootstrap.com/components/#glyphicons}{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")}
\item{class}{Additional classes to customize the style of the icon (see the
\href{http://fontawesome.io/examples/}{usage examples} for details on
supported styles).}
\item{lib}{Icon library to use ("font-awesome" or "glyphicon")}
}
\value{
An icon element
}
\description{
Create an icon for use within a page. Icons can appear on their own, inside
of a button, or as an icon for a \code{\link{tabPanel}} within a
\code{\link{navbarPage}}.
}
\examples{
icon("calendar") # standard icon
icon("calendar", "fa-3x") # 3x normal size
icon("cog", lib = "glyphicon") # From glyphicon library
# 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"))
)
}
\seealso{
For lists of available icons, see
\href{http://fontawesome.io/icons/}{http://fontawesome.io/icons/} and
\href{http://getbootstrap.com/components/#glyphicons}{http://getbootstrap.com/components/#glyphicons}.
}