read_icon: Read an individual icon

View source: R/icon.R

read_iconR Documentation

Read an individual icon

Description

Read an individual icon

Usage

read_icon(x)

Arguments

x

Path to the icon

Value

An icons vector: an SVG icon that can be printed, embedded in R Markdown, or styled with icon_style(). If x is a file path, it is retained and can be retrieved with icon_path().

Examples

path <- tempfile(fileext = ".svg")
writeLines(
  '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0"/></svg>',
  path
)
read_icon(path)


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