Skip to content

Iconify for Vue 2 function: iconExists

This tutorial is part of Iconify for Vue 2 functions tutorial.

The function iconExists() checks if icon data is available for rendering.


The function has the following parameter:

  • name, string. Icon name.

The function returns boolean value: true if icon is available, false if icon is not available.


jsimport { iconExists } from '@iconify/vue2';

const icon = 'bi:arrow-left';
console.log(`Is ${icon} available?`, iconExists(icon) ? 'yes' : 'no');

Released under the Apache 2.0 License.