icon-to-html


目录

title: iconToHTML() in Iconify Utils
types:
  IconifyIconBuildResult: './icon-to-svg.md#build-result'
functions:
  iconToSVG: './icon-to-svg.md'
  parseSVGContent: './parse-svg-content.md'
  buildParsedSVG: './build-parsed-svg.md'

iconToHTML()

This function is part of Iconify Utils package.

Function [func]iconToHTML() generates SVG from a list of attributes for [tag]svg element and icon content.

It can be used with results of [func]iconToSVG(), [func]parseSVGContent() or [func]buildParsedSVG().

Usage

Function has the following parameters:

Function returns [type]string.

Notes

Function adds the following attributes automatically, do not add them in [prop]attributes parameter:

Attribute values are not modified. Make sure they are escaped before calling function.

Example

src: libraries/utils/get-icon.ts
title: 'example.ts'

版本号 #2
由 壳壳虫 创建于 2026-10-31 14:28:56 UTC
由 壳壳虫 更新于 2026-10-31 14:28:57 UTC