icon_save: Save icons into a local path

View source: R/save.R

icon_saveR Documentation

Save icons into a local path

Description

Store icons in a local directory to simplify sharing of documents containing icons. Bundling icons with your document or app avoids the need for collaborators or servers to have all icons from a library installed.

Usage

icon_save(icons, path = ".")

Arguments

icons

A named list of icons, the names specify the icon's name in the new icon set.

path

A directory to save the icons into.

Value

Invisibly, the icon_set created from the newly saved SVG files at path.

Examples

if(icon_installed(fontawesome) && icon_installed(ionicons)){

path <- tempfile()
dir.create(path)
icon_save(
  list(arrow = fontawesome$solid$`arrow-right`, alarm = ionicons$alarm),
  path = path
)

app_icons <- icon_set(path)
app_icons$arrow

}


icons documentation built on Sept. 3, 2026, 5:10 p.m.