icon-exists
title: "Iconify for Svelte Function: iconLoaded"
functions:
getIcon: "./get-icon.md"
Iconify for Svelte function: iconLoaded
This tutorial is part of Iconify for Svelte functions tutorial.
include icon-components/functions/icon-loaded/intro
Usage
include icon-components/functions/icon-loaded/props
Example
This example renders [prop]fallback snippet while icon is being loaded.
src: icon-components/common/icon-exists.svelte
Usage example:
<IconWrapper icon="mdi-light:alert">
{#snippet fallback()}
<small>!</small>
{/snippet}
</IconWrapper>
This example uses [func]iconLoaded() to show function, but for this purpose it is better to use [func]getIcon(). See [func]getIcon() documentation for better example.
Legacy
include icon-components/functions/icon-loaded/legacy
这篇文档对你有帮助吗?
谢谢你的反馈!