Skip to content

iconify-cli / applyTemplate

Function: applyTemplate() ​

applyTemplate(templateName, prefix, icon, collection, svg): string

Defined in: src/lib/template.ts:97

Applies a specified template to the given SVG string with additional metadata.

Parameters ​

templateName ​

The name identifier of the template to apply.

"raw" | "svg" | "raw-ts" | "vue" | "php" | "jsx" | "tsx"

prefix ​

string

The collections prefix (mdi, material-icons)

icon ​

string

The name of the icon

collection ​

IconifyInfo

Metadata object describing the collection properties.

svg ​

string

The SVG string to be processed using the template.

Returns ​

string

The resulting string after the template has been applied and processed with the SVG and metadata.