Easily Insert SVG Icons into R Outputs
Overview
Provides tools to download, style, and insert scalable vector graphics (SVG) icons into R output, such as 'R Markdown' and 'Quarto' documents, 'Shiny' apps, 'gt' tables, and 'ggplot2' visualisations via the 'ggicons' package. Bundles popular icon libraries, such as 'Font Awesome' (https://fontawesome.com), 'Academicons' (https://jpswalsh.github.io/academicons/), and 'Material Design Icons' (https://fonts.google.com/icons), which are downloaded on demand to keep the package small, or build a custom icon set from any folder of local SVG files. Icon appearance, such as size, colour, and position, can be customised.
New icon sets
- Added the
health_icons()icon set (https://healthicons.org/). - Added the
super_tiny_icons()icon set (https://github.com/edent/SuperTinyIcons).
New features
- Added
icon_uri(), which encodes icons as self-contained base64 data strings. This makes it easier to use icons in other contexts, such as gt tables and as leaflet markers. - Added icon vectors, to make it easier to use icons in data-oriented workflows (e.g. in tables, graphics, maps, ...)
- Added
icon_path(), giving the file path(s) of an icon's source SVG - handy for using icons with ggplot2 and other packages that plot from image files. - Added
icon_label(), for identifying an icon by its library accessor label (for example"fontawesome$solid$rocket").
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
- Added a "Using icons" vignette covering installation, insertion, styling, custom icon sets and Shiny usage.
Breaking changes
- Icons are now fully vectorised. Accessing a single icon (e.g.
fontawesome$solid$rocket) no longer returns a scalar icon that outputs raw SVG directly - it returns a length-1iconsvector, the same type returned byicon_find()and other multi-icon results. Code that reached into a result as a rawhtmltoolstag, or calledformat()expecting SVG markup, should usehtmltools::as.tags()first.
Improvements
- Each icon set's documentation now includes a "License" section describing the license its icons are distributed under, with a link to the source (#15).
- Messages, warnings and errors are now consistently produced with the
clipackage, and include more helpful hints (crayonis no longer used). - Icon set functions now suggest similarly named icons when a requested icon can't be found (#67).
iconsvectors now have anas.character()method that returns their labels.- Improved embedding of icons in other output formats.
- Improved the base icon style used for inline icon positioning.
- Downloading
google_material()icons is now faster, using a git sparse checkout to fetch only the required SVG files (#70). - The package's startup message is now suppressed in development sessions (e.g.
devtools::load_all()).
Bug fixes
- Icons now work as expected in titles (#7).
- Icons now work alongside emojis (#25).
- Fixed
icon_find()when searching custom icon sets (#38). - Fixed the download URL for
octicons()(thanks @bbest, #58).
From NEWS.md in the release
Install
Health
- OK13 OKNow
- OK7 OK2026-09-04
Documentation
- Help pages
- 20 (1 internal)includes a package overview page
- Examples that run
- 100%9 run in a plain check
- Exported functions with examples
- 47%
- Documented parameters
- 97%
- Return-value docs
- 100%
- Help pages citing references
- 0%
- Using icons HTML
Downloads
Repository
- PRs merged (all time)
- 92%
- Median days to close, 50 most recently updated closed issues
- 105
- Median days to close, 50 most recently updated closed PRs
- 0
Commits over time
Commit identities over time
8 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/mitchelloharawild/icons on 2026-10-18.
The R CMD check workflow runs on Linux
GitHub Pages site last deployed 2026-09-03 · The repository has a site deploy workflow
pkgdown site last built 2026-09-03
Dependencies
Installing icons adds 20 packages (15 with compiled code, 16 MB of source tarballs). Heaviest: stringi 11 MB, jsonlite 1.0 MB, vctrs 1.0 MB.
Code & Tests
People & History
- 1.0.0Latest2026-09-03 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-09-03
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.1.3
- Download size
- 73 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("icons")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.