PHPackages                             bernhardh/nova-icon-select - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. bernhardh/nova-icon-select

AbandonedArchivedLibrary

bernhardh/nova-icon-select
==========================

A larvel nova icon select field

1.0.0(5y ago)732.9k↓40.3%3[1 issues](https://github.com/bernhardh/nova-icon-select/issues)MITPHPPHP &gt;=7.1.0

Since Dec 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/bernhardh/nova-icon-select)[ Packagist](https://packagist.org/packages/bernhardh/nova-icon-select)[ RSS](/packages/bernhardh-nova-icon-select/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Nova Icon Select
================

[](#nova-icon-select)

This is a laravel nova field to select an icon from an icon set. The icon sets are defined by an `IconProvider`, so you can define your own set. The package has a predefined `IconProvider` for `FontAwesome 5 Free`.

### Screenshots

[](#screenshots)

### Edit

[](#edit)

[![Edit](https://raw.githubusercontent.com/bernhardh/nova-icon-select/master/docs/edit.gif)](https://raw.githubusercontent.com/bernhardh/nova-icon-select/master/docs/edit.gif)

### Index

[](#index)

[![Index](https://raw.githubusercontent.com/bernhardh/nova-icon-select/master/docs/index.png)](https://raw.githubusercontent.com/bernhardh/nova-icon-select/master/docs/index.png)

### Details

[](#details)

[![Detail](https://raw.githubusercontent.com/bernhardh/nova-icon-select/master/docs/detail.png)](https://raw.githubusercontent.com/bernhardh/nova-icon-select/master/docs/detail.png)

Installation
------------

[](#installation)

Install this package with composer

```
composer require bernhardh/nova-icon-select

```

You need to include the styles of the icon set to nova by your own. A common way to do this is to add it to your `resources/views/vendor/nova/partials/meta.blade.php`.

For `FontAwesome` you can do this like this:

```

```

Of course, you can also host the icon-set on your server or even use completly different icons.

Usage
-----

[](#usage)

Like every other field, you can use the field inside your Nova Resource. You will need to provide an `IconProvider`. Either use the build in `FontAwesomeIconProvider` or use an instance of `IconProvider` or create your own.

```
use Bernhardh\NovaIconSelect\NovaIconSelect;

NovaIconSelect::make("Icon", "icon")
    ->setIconProvider(/* Instance or classname of an IconProvider */);
```

Using with FontAwesome 5 Free
-----------------------------

[](#using-with-fontawesome-5-free)

For `FontAwesome 5 Free`, there is already a build in Provider. Use it like this:

```
use Bernhardh\NovaIconSelect\NovaIconSelect;
use Bernhardh\NovaIconSelect\IconProviders\FontAwesomeIconProvider;

NovaIconSelect::make("Icon")
    ->setIconProvider(FontAwesomeIconProvider::class);
```

If you want to change the labels, remove icons or add search tags, you can publish the config:

```
php artisan vendor:publish --provider="Bernhardh\NovaIconSelect\FieldServiceProvider"

```

and now you can modify the `config/nova-icon-select/fontawesome.php` file as you like.

Using with your own icon sets
-----------------------------

[](#using-with-your-own-icon-sets)

To use your own icon set, you can either create your own `IconProvider` class and extend it from `Bernhardh\NovaIconSelect\IconProvider` or you can use `Bernhardh\NovaIconSelect\IconProvider` as an instance and add your options directly.

### Use instance and setOptions

[](#use-instance-and-setoptions)

```
use Bernhardh\NovaIconSelect\NovaIconSelect;
use Bernhardh\NovaIconSelect\IconProvider;

NovaIconSelect::make("Icon")
    ->setIconProvider(IconProvider::make()->setOptions([
        [
            'label' => 'Custom icon 1',
            'value' => 'my-icons-1',
            'search' => ['foo']
        ],
        [
            'label' => 'Custom icon 2',
            'value' => 'my-icons-2',
        ],
        [
            'label' => 'Custom icon 2',
            'value' => 'my-icons-3',
            'search' => ['foo', 'bar']
        ],
    ]));
```

Or you can of course also move the options to a config file and get it with `config()`

```
use Bernhardh\NovaIconSelect\NovaIconSelect;
use Bernhardh\NovaIconSelect\IconProvider;

NovaIconSelect::make("Icon", "icon")
    ->setIconProvider(
        IconProvider::make()->setOptions(config("iconset"))
    );
```

### Use your own class

[](#use-your-own-class)

```
use Bernhardh\NovaIconSelect\IconProvider;

class MyCustomIconProvider extends IconProvider {

    public function __construct() {
        $this->setOptions([
            [
                'label' => 'Custom icon 1',
                'value' => 'my-icons-1',
                'search' => ['foo']
            ],
            [
                'label' => 'Custom icon 2',
                'value' => 'my-icons-2',
            ],
            [
                'label' => 'Custom icon 2',
                'value' => 'my-icons-3',
                'search' => ['foo', 'bar']
            ],
        ]);
    }
}
```

Now you can use it

```
use Bernhardh\NovaIconSelect\NovaIconSelect;

NovaIconSelect::make("Icon")
    ->setIconProvider(MyCustomIconProvider::class);
```

Options
-------

[](#options)

Example:

```
[
    'label' => 'Custom icon 1',
    'value' => 'my-icons-1',
    'search' => ['foo', 'bar']
]
```

Each option consist of these fields:

- `label`: Required string. This is the value which will be shown in nova and this value is used in the search (checks if label *contains* search string)
- `value`: Required string. This is the actual icon class or identifier which will be stored to the database. In case of `FontAwesome`, this would be something like `fas fa-edit`
- `search:`: Optional string array. This array is used in the search (checks if one of the strings *start with* the search string)
- `unicode`: Optional string. Currently not used

Of course you can move the options to a config file as I did with the `FontAwesomeIconProvider`

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1973d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2ed343a2b516345609708c656b59c79eebf1c86db4bbcf7044723e3091475520?d=identicon)[bernhardh](/maintainers/bernhardh)

---

Top Contributors

[![bernhardh](https://avatars.githubusercontent.com/u/642292?v=4)](https://github.com/bernhardh "bernhardh (7 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/bernhardh-nova-icon-select/health.svg)

```
[![Health](https://phpackages.com/badges/bernhardh-nova-icon-select/health.svg)](https://phpackages.com/packages/bernhardh-nova-icon-select)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[coreproc/nova-notification-feed

A Laravel Nova package that adds a notification feed in your Nova app.

10149.1k](/packages/coreproc-nova-notification-feed)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[cybercog/laravel-nova-ban

A Laravel Nova banning functionality for your application.

40199.8k](/packages/cybercog-laravel-nova-ban)[insenseanalytics/nova-server-monitor

A Laravel Nova tool for Spatie's Server Monitor library.

6546.9k](/packages/insenseanalytics-nova-server-monitor)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
