Skip to content

Iconify types

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

TypeScript

All types are described with TypeScript.

If you are not familiar with TypeScript, but are familiar with JavaScript, it should not be hard to understand this documentation because it is mostly just basic types.

Few basic TypeScript concepts you need to know to understand documentation:

Record

Type Record<string,number> is an object, where key is string, value is number.

For PHP developers it is the same as associative array.

unknown

Type unknown means value can be any type.

extends

tsinterface Foo extends Bar, Baz {}

This means one type extends another type. In the example above, type Foo has all properties of types Bar and Baz.

Main types

There are two main types that are used in Iconify ecosystem:

  • IconifyIcon is used for data for one icon.
  • IconifyJSON is used for an entire icon set. It stores icon data, icon aliases and various metadata.

Additional types

These types are used in IconifyJSON type:

Released under the Apache 2.0 License.