Create an icon for use within a page in a Shiny app. Icons can appear on their own, inside of a button, or as an icon for a tabPanel within a navbarPage.

humicon(name, size = 1, fixed_width = FALSE, animate = "still",
  rotate = 0, flip = "none", border = FALSE, pull = NULL,
  color = NULL, colour = color, other = NULL, class = NULL)

Arguments

name

A string indicating the icon name.

size

Size of the icon relative to font size. Options are 1, lg (33 increase), 2, 3, 4, or 5.

fixed_width

If TRUE, the icon is set to a fixed width

animate

'still', 'spin', or 'pulse'.

rotate

Rotate degree: 0, 90, 180, or 270.

flip

'none', 'horizontal', 'vertical'.

border

If TRUE, draws a border around the icon.

pull

Pulls icon to either 'left' or 'right' and wraps proceeding text around it.

color, colour

Hex code for a colour to be given to the icon

other

Character vector of other parameters directly added to the icon classes

Value

An Shiny icon element

Examples

# add an icon to a submit button submitButton("Update View", icon = icon("Fund"))
#> Error in submitButton("Update View", icon = icon("Fund")): could not find function "submitButton"
navbarPage("App Title", tabPanel("Plot", icon = humicon("Food-Security")), tabPanel("Summary", icon = humicon("Agriculture")), tabPanel("Table", icon = humicon("Livestock")) )
#> Error in navbarPage("App Title", tabPanel("Plot", icon = humicon("Food-Security")), tabPanel("Summary", icon = humicon("Agriculture")), tabPanel("Table", icon = humicon("Livestock"))): could not find function "navbarPage"