Skip to content

IconifyInfo type

All Iconify libraries share common object structures. They are described as types in @iconify/types NPM package.

For description of types and short explanation of TypeScript see types documentation.

This article describes IconifyAlias type.

Structure

Type IconifyInfo is used for information about icon set.

It has the following mandatory properties:

  • name, string. Icon set name.
  • author, object. Author information (see below).
  • license, object. License information (see below).

Then it has many optional properties, most of these properties are intended for displaying icon set data in list of icon sets:

  • total, number. Number of icons in an icon set (see below).
  • version, string. Version string.
  • samples, string[]. Array of icon names to show as samples.
  • height, number|number[]. Icon grid. If an icon set has mix of icons with different height values, such as half of icons are 16 pixels high, half are 24 pixels high, value can be an array.
  • displayHeight, number. Height to use when showing samples. Value should be between 16 and 24.
  • category, string. Category in icon sets list.
  • tags, string[]. List of tags, which can be used to filter icon sets (added in version 2).
  • palette, boolean. Set to true if all icons use hardcoded colors, set to false if all icons use currentColor.

Author

author property is an object with following properties:

  • name, string. Author name, mandatory.
  • url, string. Optional link to icon set website. Usually links to GitHub repository.

License

license property is an object with following properties:

  • title, string. Human readable license, mandatory.
  • spdx, string. Optional SPDX license identifier.
  • url, string. Optional link to license file.

Examples

json{
   "name": "Phosphor",
   "total": 5206,
   "version": "1.3.2",
   "author": {
       "name": "Phosphor Icons",
       "url": "https://github.com/phosphor-icons/phosphor-icons"
   },
   "license": {
       "title": "MIT",
       "spdx": "MIT"
   },
   "samples": [
       "folder-notch-open-duotone",
       "check-square-offset-thin",
       "pencil-line-fill"
   ],
   "height": 24,
   "displayHeight": 24,
   "category": "General",
   "palette": false
}
json{
   "name": "Emoji One (Colored)",
   "total": 1834,
   "version": "2.3.0",
   "author": {
       "name": "Emoji One",
       "url": "https://github.com/EmojiTwo/emojitwo"
   },
   "license": {
       "title": "CC BY 4.0",
       "spdx": "CC-BY-4.0",
       "url": "https://creativecommons.org/licenses/by/4.0/"
   },
   "samples": [
       "anxious-face-with-sweat",
       "cloud-with-snow",
       "studio-microphone"
   ],
   "height": 32,
   "displayHeight": 16,
   "category": "Emoji",
   "palette": true
}

Released under the Apache 2.0 License.