Create a weathericon 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().

weathericon(
  name = NULL,
  wind = TRUE,
  flip = NULL,
  rotate = NULL,
  towards = NULL,
  from = NULL,
  className = NULL,
  ...
)

Arguments

name

Name of the icon

wind

Should the Wind-Stylesheet be included as dependency. The default is TRUE

flip

Flip the icon. Either horizontal or vertical

rotate

Rotate the icon. Valid values are 0,90,180,270,360

towards

The `towards`-direction for wind icons can be specified either by degrees or by an orientation. See the details.

from

The `from`-direction for wind icons can be specified either by degrees or by an orientation. See the details.

className

Define an additional classname for the icon tag.

...

Additional arguments that are passed to the attributes of the i-tag. Style arguments must be passed as a named list.

Value

A weather-icon element

Details

The arguments towards and from can either be an integer value between 0-360 or a character giving the direction. The possible items are stored in the dataset quadrants.

See also

Examples

# NOT RUN {
## To see a full List of icons please run this shiny-app
shiny::runApp(system.file("examples/app.R", package = "weathericons"),
             display.mode="showcase")

## To see how to use classes with icons see the following shiny-app
shiny::runApp(system.file("examples/app_classes.R", package = "weathericons"),
              display.mode="showcase")

## To see how to use JS functions and inline styling, please run this shiny-app
shiny::runApp(system.file("examples/js_functions.R", package = "weathericons"),
              display.mode="showcase")

## To see how to use weathericons for leaflet popups and labels, see
shiny::runApp(system.file("examples/leaflet_popup.R", package = "weathericons"),
              display.mode="showcase")


weathericon("wi-forecast-io-fog")
weathericon("wi-wu-chanceflurries")
weathericon("wi-moon-waxing-crescent-3")
weathericon("wi-forecast-io-rain")

## Rotating Icons
weathericon("wi wi-yahoo-7", rotate = "90")
weathericon("wi wi-yahoo-7", rotate = "180")
weathericon("wi wi-yahoo-7", rotate = "270")

## Flipping Icons
weathericon("wi wi-yahoo-7", flip = "vertical")

## Wind Icons with Directions
weathericon("wi wi-wind", towards = "sse")
weathericon("wi-wind", from = "sw")
weathericon("wi wi-wind", towards = 40)
weathericon("wi wi-wind", from = 40)
# }