| icon_style | R Documentation |
Customise the style of an icon
icon_style(x, scale = NULL, fill = NULL, rotate = NULL, ...)
x |
The icon to style. |
scale |
Scaled size of the icon. |
fill |
The colour for the fill. |
rotate |
The angle to rotate the icon. |
... |
Other CSS rules for the icon style, for example |
The input x (an icons vector), with its style updated to
reflect the requested styling.
path <- tempfile(fileext = ".svg")
writeLines(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0"/></svg>',
path
)
icon <- read_icon(path)
icon_style(icon, scale = 2, fill = "red", rotate = 90)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.