Package-level declarations

Types

Link copied to clipboard
external interface IconifyAPIProviderConfig

API provider configuration for addAPIProvider.

Link copied to clipboard
abstract external class IconifyIconElement : HTMLElement

The <iconify-icon> custom element.

Link copied to clipboard
external interface IconifyIconName

Icon name split into parts.

Link copied to clipboard

Typed tag name of the <iconify-icon> custom element.

Link copied to clipboard
external object IconifyModule

The named exports of the iconify-icon package. Importing the module registers the <iconify-icon> custom element.

Functions

Link copied to clipboard
external fun addAPIProvider(provider: String, config: IconifyAPIProviderConfig): Boolean

Registers or replaces the API configuration for provider.

Link copied to clipboard
external fun addCollection(data: IconifyJSON, provider: String? = definedExternally): Boolean

Adds an icon set to storage.

Link copied to clipboard
external fun addIcon(name: String, data: IconifyIcon?): Boolean

Adds an icon to storage.

Link copied to clipboard

Creates an <iconify-icon> element displaying icon.

Link copied to clipboard
external fun getIcon(name: String): IconifyIcon?

Returns icon data with all default properties filled in.

Link copied to clipboard
external fun iconLoaded(name: String): Boolean

Checks whether icon data is available locally.

Link copied to clipboard
external fun listIcons(provider: String? = definedExternally, prefix: String? = definedExternally): Array<String>

Lists available icons in prefix:name form, or @provider:prefix:name for icons from a non-default provider.

Link copied to clipboard
external fun loadIcon(icon: String): Promise<IconifyIcon>

Loads one icon from the Iconify API.

Link copied to clipboard
external fun loadIcons(icons: Array<String>, callback: (loaded: Array<IconifyIconName>, missing: Array<IconifyIconName>, pending: Array<IconifyIconName>, unsubscribe: () -> Unit) -> Unit? = definedExternally): () -> Unit

Loads multiple icons from the Iconify API.

Link copied to clipboard
fun registerIconifyIcon(): dynamic

Imports iconify-icon, which registers the <iconify-icon> custom element, and returns the component.