Iconify for React function: listIcons

This tutorial is part of Iconify for React functions tutorial.

Function listIcons() lists available icons.

Usage

Function has the following optional parameters:

  • provider, string. Lists only icons from one API provider.
  • prefix, string. Lists only icons with specific prefix. If prefix is set, provider must be set too (for Iconify public API provider value is empty string "").

Function returns array of icon names.

Examples

import { listIcons } from '@iconify/react';

// List all icons
console.log(listIcons());
import { listIcons } from '@iconify/react';

// List all loaded Material Design Icons
console.log(listIcons('', 'mdi'));
// ["mdi:alert", "mdi:home", "mdi:account-box-outline", "mdi:eyedropper", "mdi:account-off", "mdi:account", "mdi:account-box", "mdi:account-cash"]