icon

0th

Percentile

Create an icon

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.

Usage
icon(name, class = NULL, lib = "font-awesome")
Arguments
name
Name of icon. Icons are drawn from the http://fontawesome.io/icons/{Font Awesome} and http://getbootstrap.com/components/#glyphicons{Glyphicons"} libraries. Note that the "fa-" and "glyphicon-" prefixes should not be used in icon
class
Additional classes to customize the style of the icon (see the http://fontawesome.io/examples/{usage examples} for details on supported styles).
lib
Icon library to use ("font-awesome" or "glyphicon")
Value

  • An icon element

See Also

For lists of available icons, see http://fontawesome.io/icons/{http://fontawesome.io/icons/} and http://getbootstrap.com/components/#glyphicons{http://getbootstrap.com/components/#glyphicons}.

Aliases
  • icon
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"))

shinyUI(navbarPage("App Title",
  tabPanel("Plot", icon = icon("bar-chart-o")),
  tabPanel("Summary", icon = icon("list-alt")),
  tabPanel("Table", icon = icon("table"))
))
Documentation reproduced from package shiny, version 0.12.2, License: GPL-3 | file LICENSE

Community examples

Looks like there are no examples yet.