Create a Phosphor icon with font files.
Arguments
- name
Name of the icon to use.
- weight
Weight of icon (from thinnest to thickest):
thin
,light
(default),regular
,bold
orfill
.- size
Size of icon.
- color
Color of icon: use valid HTML color or hex code.
- ...
Attributes passed to the
i
tag.
Examples
library(phosphoricons)
ph_i("airplane-tilt")
#> <i class="ph-light ph-airplane-tilt ph-lg"></i>
ph_i("airplane-tilt", weight = "thin")
#> <i class="ph-thin ph-airplane-tilt ph-lg"></i>
ph_i("airplane-tilt", weight = "bold")
#> <i class="ph-bold ph-airplane-tilt ph-lg"></i>
ph_i("house")
#> <i class="ph-light ph-house ph-lg"></i>
ph_i("house", color = "#F45B69")
#> <i class="ph-light ph-house ph-lg" style="color:#F45B69;"></i>
ph_i("cake")
#> <i class="ph-light ph-cake ph-lg"></i>
ph_i("cake", size = "xl")
#> <i class="ph-light ph-cake ph-xl"></i>
ph_i("cake", size = "10x")
#> <i class="ph-light ph-cake ph-10x"></i>