mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-02 10:45:06 -05:00
These functions were temporarily ripped out of Shiny and moved to the htmltools package. We've discovered that it's safe to keep including them in shiny; as long as the functions in shiny and the functions in htmltools are identical, the user won't receive a conflict warning.
43 lines
1.2 KiB
R
43 lines
1.2 KiB
R
% Generated by roxygen2 (4.0.1): do not edit by hand
|
|
\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{http://fontawesome.io/icons/}{Font Awesome} library. Note that the
|
|
"fa-" prefix 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" is only one currently
|
|
supported)}
|
|
}
|
|
\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
|
|
|
|
# add an icon to a submit button
|
|
submitButton("Update View", icon = icon("refresh"))
|
|
|
|
shinyUI(navbarPage("App Title",
|
|
tabPanel("Plot", icon = icon("bar-chart-o")),
|
|
tabPanel("Summary", icon = icon("list-alt")),
|
|
tabPanel("Table", icon = icon("table"))
|
|
))
|
|
}
|
|
|