PHP code example of adamkiss / kirby-icons-heroicons

1. Go to this page and download the library: Download adamkiss/kirby-icons-heroicons library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

adamkiss / kirby-icons-heroicons example snippets


// in your config.php, configure icon-field to use Heroicons by default
'tobimori.icon-field' => [
    'folder' => fn() => \Heroicons::folder(),
    'sprite' => fn() => \Heroicons::sprite(),
],

<?= snippet("heroicons/mini/{$page->icon()}") 
 php
// use an icon as is
snippet('heroicons/solid/check');

// or
snippet('heroicons/mini/check');

// or add additional classes
snippet('heroicons/outline/check', [
    'class' => 'red-color',
    'attributes' => 'aria-hidden="true" data-hook="something"' // You can also add custom attributes
    'strokeWidth' => 3 // Outline icons have a modifiable stroke width as well
]);