UIkit's icon library can be extended and customized with your own icon files.
UIkit's icon library contains a number of SVG icons bundled in a single JavaScript file uikit-icons.min.js. This file includes all icons, no additional SVG files are needed. In this document, we will describe how you can add Font Awesome 5 icons to this library. Look at the UIKit's Icon component for an overview of the default icons.
With these simple steps, you can easily add your own SVG icons to UIKit framework by including them in UIkit's build process.
The build process will check 3 places for svg icon files:
/src/images/icons/*.svg/custom/icons/*.svg/custom/mytheme/icons/*.svg npm run compile
Your additional icons will now be added to the icon library, in one of these two places:
dist/js/uikit-icons.js if you have added the icon to UIkit globallydist/js/uikit-icons-mytheme.js if the icon is only inside a UIkit themeMake sure to include the icon library script, for more details see the installation instructions.
Place your icons anywhere in your content the same way you add icons in UIKit 3.
Please notice that I have prefixed all the icons with fa- to prevent conflict with any existing icons.
<span uk-icon="fa-chrome"></span>
<span uk-icon="fa-google-drive"></span>
<span uk-icon="fa-snapchat-ghost"></span>
<span uk-icon="fa-nintendo-switch"></span>
<span uk-icon="icon: fa-bitcoin; ratio: 3;"></span>
<span uk-icon="icon: fa-bitcoin; ratio: 5;"></span>
<span uk-icon="icon: fa-bitcoin; ratio: 7;"></span>
<a href="#" class="uk-icon-button" uk-icon="fa-twitter"></a>
<a href="#" class="uk-icon-button" uk-icon="fa-facebook-f"></a>
<a href="#" class="uk-icon-button" uk-icon="fa-google"></a>
<span class="uk-text-warning" uk-icon="icon: fa-grunt; ratio: 7;">
<span class="uk-text-success" uk-icon="icon: fa-xbox; ratio: 7;">
<span class="uk-text-danger" uk-icon="icon: fa-laravel; ratio: 7;">