Skip to contents

Iconify hosts 240+ icon sets behind one API. The icons below come from 12 of them, each fetched with iconify_get(). Hover over an icon to see its id. The table helper (gallery()) is defined in this article’s source.

Same idea, different sets

Seven sets, each with its own drawing style and license. Monotone icons take the surrounding text color, so they follow light and dark themes.

gallery(list(
  mdi = c("home", "rocket-launch", "chart-line", "github"),
  tabler = c("brand-github", "map-pin", "leaf", "bolt"),
  lucide = c("camera", "sun", "leaf", "map"),
  ph = c("airplane", "tree", "map-pin", "chart-bar"),
  bi = c("globe", "tree", "bicycle", "graph-up"),
  carbon = c("earth", "chart-line", "map", "tree"),
  `fa6-solid` = c("tree", "earth-americas", "chart-simple", "bicycle")
))
Icon set License Icons
Material Design Icons
mdi
Apache-2.0
Tabler Icons
tabler
MIT
Lucide
lucide
ISC
Phosphor
ph
MIT
Bootstrap Icons
bi
MIT
Carbon
carbon
Apache-2.0
Font Awesome 6 Solid
fa6-solid
CC-BY-4.0

Brand logos

gallery(list(
  `fa6-brands` = c("r-project", "github", "python", "docker"),
  `simple-icons` = c("rstudioide", "quarto", "github", "posit"),
  logos = c("r-lang", "github-icon", "python", "docker-icon")
))
Icon set License Icons
Font Awesome 6 Brands
fa6-brands
CC-BY-4.0
Simple Icons
simple-icons
CC0-1.0
SVG Logos
logos
CC0-1.0

Multicolor sets

color only recolors monotone icons. Emoji and flat-color sets keep their own palette.

gallery(list(
  twemoji = c("globe-showing-americas", "seedling", "bar-chart", "rocket"),
  `flat-color-icons` = c("globe", "combo-chart", "camera")
))
Icon set License Icons
Twitter Emoji
twemoji
CC-BY-4.0
Flat Color Icons
flat-color-icons
MIT

Color, size, flip and rotate

One icon, many variations:

id <- "mdi:rocket-launch"
tags$div(
  icon_cell(id, color = "#e63946"),
  icon_cell(id, color = "#2a9d8f"),
  icon_cell(id, color = "#457b9d", size = 64),
  icon_cell(id, color = "#f4a261", flip = "horizontal"),
  icon_cell(id, color = "#8d5fd3", rotate = 90),
  icon_cell(id, color = "#264653", rotate = 180, flip = "vertical")
)
iconify_html("mdi:rocket-launch", color = "#f4a261", flip = "horizontal")
iconify_html("mdi:rocket-launch", color = "#8d5fd3", rotate = 90)

Pick an icon from search results

hits <- iconify_search("rocket", prefixes = c("mdi", "tabler", "ph", "lucide"), limit = 32)
head(hits, 8)
#>                   id prefix           name
#> 1         mdi:rocket    mdi         rocket
#> 2 mdi:rocket-outline    mdi rocket-outline
#> 3      tabler:rocket tabler         rocket
#> 4      lucide:rocket lucide         rocket
#> 5          ph:rocket     ph         rocket
#> 6     ph:rocket-bold     ph    rocket-bold
#> 7  ph:rocket-duotone     ph rocket-duotone
#> 8     ph:rocket-fill     ph    rocket-fill

Credits

Using an icon means following its set’s license. iconify_sets() lists the license and author of every set, which is enough for a credit line:

credits <- sets
credits$attribution <- ifelse(grepl("^(CC-BY|ODbL)", credits$license_spdx), "required", "-")
credits[c("prefix", "name", "author", "license_title", "attribution")]
#>              prefix                  name                     author
#> 1               mdi Material Design Icons              Pictogrammers
#> 2            tabler          Tabler Icons                 Paweł Kuna
#> 3            lucide                Lucide        Lucide Contributors
#> 4                ph              Phosphor             Phosphor Icons
#> 5                bi       Bootstrap Icons      The Bootstrap Authors
#> 6            carbon                Carbon                        IBM
#> 7         fa6-solid  Font Awesome 6 Solid                 Dave Gandy
#> 8        fa6-brands Font Awesome 6 Brands                 Dave Gandy
#> 9      simple-icons          Simple Icons Simple Icons Collaborators
#> 10            logos             SVG Logos                Gil Barbara
#> 11          twemoji         Twitter Emoji                    Twitter
#> 12 flat-color-icons      Flat Color Icons                     Icons8
#>    license_title attribution
#> 1     Apache 2.0           -
#> 2            MIT           -
#> 3            ISC           -
#> 4            MIT           -
#> 5            MIT           -
#> 6     Apache 2.0           -
#> 7      CC BY 4.0    required
#> 8      CC BY 4.0    required
#> 9        CC0 1.0           -
#> 10           CC0           -
#> 11     CC BY 4.0    required
#> 12           MIT           -

iconify_license() returns the same data for one set, plus the license and author URLs, and prints a message when attribution is required.