Debian Codegraph @

man/icon.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/bootstrap.R
3 \name{icon}
4 \alias{icon}
5 \title{Create an icon}
6 \usage{
7 icon(name, class = NULL, lib = "font-awesome", ...)
8 }
9 \arguments{
10 \item{name}{The name of the icon. A name from either \href{https://fontawesome.com/}{Font Awesome} (when \code{lib="font-awesome"}) or
11 \href{https://getbootstrap.com/docs/3.3/components/#glyphicons}{Bootstrap Glyphicons} (when
12 \code{lib="glyphicon"}) may be provided. Note that the \code{"fa-"} and
13 \code{"glyphicon-"} prefixes should not appear in name (i.e., the
14 \code{"fa-calendar"} icon should be referred to as \code{"calendar"}). A \code{name} of
15 \code{NULL} may also be provided to get a raw \verb{<i>} tag with no library attached
16 to it.}
17
18 \item{class}{Additional classes to customize the style of an icon (see the
19 \href{https://fontawesome.com/how-to-use}{usage examples} for details on
20 supported styles).}
21
22 \item{lib}{The icon library to use. Either \code{"font-awesome"} or \code{"glyphicon"}.}
23
24 \item{...}{Arguments passed to the \verb{<i>} tag of \link[htmltools:builder]{htmltools::tags}.}
25 }
26 \value{
27 An \verb{<i>} (icon) HTML tag.
28 }
29 \description{
30 Create an icon for use within a page. Icons can appear on their own, inside
31 of a button, and/or used with \code{\link[=tabPanel]{tabPanel()}} and \code{\link[=navbarMenu]{navbarMenu()}}.
32 }
33 \examples{
34 # add an icon to a submit button
35 submitButton("Update View", icon = icon("redo"))
36
37 navbarPage("App Title",
38 tabPanel("Plot", icon = icon("bar-chart-o")),
39 tabPanel("Summary", icon = icon("list-alt")),
40 tabPanel("Table", icon = icon("table"))
41 )
42 }
43 \seealso{
44 For lists of available icons, see \url{https://fontawesome.com/icons}
45 and \url{https://getbootstrap.com/docs/3.3/components/#glyphicons}
46 }