rheroicon {rheroicons} | R Documentation |
An inline SVG icon from Heroicons
Description
Render an icon by name. Run 'launch_gallery' to view all available icons or search for icons using the 'find_icons' function.
Usage
rheroicon(name = NULL, type = "outline", class = NULL)
Arguments
name |
string containing the name of an icon |
type |
render icon by style; either 'solid', 'outline', or 'mini' (default: 'outline') |
class |
a string containing one or more 'CSS' classes (optional) |
Value
An string containing the 'SVG' markup of an icon
Styling Icons with 'CSS' class names
Icons are rendered from 'SVG' strings. All icons have three 'CSS' classes defined: global, icon style, and icon name.
- global
All icons are returned with the 'CSS' class 'rheroicons'
- icon style
-
All icons have a solid and an outlined version. The icon style 'CSS' class is determined by the value entered for 'type'. Icons can have 'rheroicons-outline', 'rheroicons-solid', or 'rheroicons-mini'.
- icon name
-
The icon name is also passed into the list of 'CSS' class. These are always structured in the following format: 'rheroicons-icon'. If the icon is 'hand-thumb-down', the 'CSS' class would be 'rheroicons-hand-thumb-down'.
Use any of combination of these classes to style icons via 'CSS'. In addition, you apply your own 'CSS' classes using the 'class' argument.
References
https://heroicons.com https://github.com/tailwindlabs/heroicons
Examples
rheroicon(name = "face-smile")
rheroicon(name = "face-smile", type = "solid")
rheroicon(name = "face-smile", class = "my-icon-set")