In a user interface, an icon is an image that represents an application, a capability, or some other concept or specific entity with meaning for the user. An icon is usually selectable but can also be a nonselectable image, such as a company's logo.

Note that icons are not bundled by default and typically must be loaded by calling initializeIcons from the @uifabric/icons package at the root of your application. See the icon documentation for more details.

For more details and examples visit the official docs. The R package can not handle each and every case, so for advanced use cases you need to work using the original docs to achieve the desired result.

FontIcon(...)

Icon(...)

ImageIcon(...)

## Arguments

ariaLabel

string
The aria label of the icon for the benefit of screen readers.

iconName

string
The name of the icon to use from the icon font. If string is empty, a placeholder icon will be rendered the same width as an icon.

iconType

IconType
The type of icon to render (image or icon font).

imageErrorAs

React.ComponentType<IImageProps>
If rendering an image icon, this component will be rendered in the event that loading the image fails.

styles

IStyleFunctionOrObject<IIconStyleProps, IIconStyles>
Gets the styles for an Icon.

theme

ITheme

className

string
Custom class to style the icon.

imageProps

IImageProps
Props passed to the Image component.

## Examples

library(shiny.fluent)

if (interactive()) {
style <- list(fontSize = 50, margin = 10)
shinyApp(
ui = tags\$div(
FontIcon(iconName = "CompassNW", style = style),
FontIcon(iconName = "Dictionary", style = style),
FontIcon(iconName = "TrainSolid", style = style)
),
server = function(input, output) {}
)
}