PHPackages                             nakanakaii/filament-countries - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nakanakaii/filament-countries

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nakanakaii/filament-countries
=============================

This Package is a wrapper around `nakanakaii/countries` for filamentPHP

v1.0.0(2mo ago)12881MITPHPPHP &gt;=8.0.0

Since Mar 2Pushed 2mo agoCompare

[ Source](https://github.com/nakanakaii/filament-countries)[ Packagist](https://packagist.org/packages/nakanakaii/filament-countries)[ Docs](https://github.com/nakanakaii/filament-countries)[ RSS](/packages/nakanakaii-filament-countries/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

filament-countries
==================

[](#filament-countries)

This package is a wrapper around [`nakanakaii/countries`](https://github.com/nakanakaii/countries) tailored for Filament PHP. It provides ready-to-use Form components, Table columns, and Table filters for dealing with countries and phone numbers seamlessly.

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

[](#installation)

You can install the package via composer:

```
composer require nakanakaii/filament-countries
```

If you wish to use the provided Image-based flags (instead of Unicode emojis), you must also publish the flags assets from the base `countries` package:

```
php artisan vendor:publish --tag=countries-flags
```

Next, conditionally publish and configure this plugin's settings:

```
php artisan vendor:publish --tag="filament-countries-config"
```

This will create a `config/filament-countries.php` file in your application where you can specify the global default flags provider:

```
return [
    'flags_provider' => 'emoji', // Options: 'emoji', 'image'
];
```

Form Components
---------------

[](#form-components)

### Country Select

[](#country-select)

Provides a searchable select dropdown populated with countries.

```
use Nakanakaii\FilamentCountries\Forms\Components\CountrySelect;

CountrySelect::make('country_id')
    ->displayFlags(true) // Whether to prefix the country name with its flag (default: true)
    ->imageFlags()       // Force this specific field to use Image flags instead of Emojis
    ->emojiFlags()       // Force this specific field to use Emoji flags instead of Images
```

**Customization:**

If you wish to hide the flags from the options, you can use `displayFlags(false)`.

```
CountrySelect::make('country_code')
    ->displayFlags(false)
```

### Phone Input

[](#phone-input)

Provides a text input configured for telephone numbers (`type="tel"`). By default, it is configured with `live(onBlur: true)` which allows it to react to the phone number and automatically fetch the Country Flag to use as a prefix, and automatically apply exact regex validation rules based on the user's entered dial code!

```
use Nakanakaii\FilamentCountries\Forms\Components\PhoneInput;

PhoneInput::make('phone_number')
```

**Customization:**

You can disable the automatic flag prefix or the automatic phone validation, or specifically enforce a flag rendering type:

```
PhoneInput::make('phone_number')
    ->displayFlags(false)
    ->applyValidation(false)
    ->imageFlags() // Explicitly return image-based flags for this field
```

If you are not using a country dial-code selector, or if you expect your users to primarily enter local phone numbers without their international `+` prefixes, you should configure the phone input to use a specific country for evaluation. This allows the package to understand the context and validate the local number properly by checking it against the right country format.

```
PhoneInput::make('phone_number')
    ->country('AE') // Validate the local number specifically for United Arab Emirates
```

You can also dynamically link the validation directly to another country form field by providing the field name!

```
CountrySelect::make('country')
    ->live(), // Important: ensure the country field is reactive if used dynamically!
PhoneInput::make('phone_number')
    ->countryField('country') // Dynamic validation based on the select above
```

Table Columns
-------------

[](#table-columns)

### Country Column

[](#country-column)

A text column that displays the country flag and name based on the country code.

```
use Nakanakaii\FilamentCountries\Tables\Columns\CountryColumn;

CountryColumn::make('country_code')
    ->displayFlags(true) // Show or hide the flag (default: true)
    ->hideName(false)    // Show or hide the country name (default: false)
    ->imageFlags()       // Force this specific column to use Image flags instead of Emojis
```

### Phone Column

[](#phone-column)

A basic text column pre-configured for phone numbers (monospaced).

```
use Nakanakaii\FilamentCountries\Tables\Columns\PhoneColumn;

PhoneColumn::make('phone_number')
```

Filters
-------

[](#filters)

### Country Filter

[](#country-filter)

A select filter to filter table data by country.

```
use Nakanakaii\FilamentCountries\Tables\Filters\CountryFilter;

CountryFilter::make('country_code')
    ->displayFlags(true) // Show or hide the flag in the dropdown options (default: true)
    ->emojiFlags()       // Force this specific filter to use Emoji flags instead of Images
```php
CountryFilter::make('country_code')
    ->displayFlags(false)
```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance86

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

71d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/64766361?v=4)[Ahmed D. ALi](/maintainers/nakanakaii)[@nakanakaii](https://github.com/nakanakaii)

---

Top Contributors

[![nakanakaii](https://avatars.githubusercontent.com/u/64766361?v=4)](https://github.com/nakanakaii "nakanakaii (3 commits)")

---

Tags

filament-pluginfilamentphpphp

### Embed Badge

![Health badge](/badges/nakanakaii-filament-countries/health.svg)

```
[![Health](https://phpackages.com/badges/nakanakaii-filament-countries/health.svg)](https://phpackages.com/packages/nakanakaii-filament-countries)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[pxlrbt/filament-environment-indicator

Indicator for the current environment inside Filament

151923.9k12](/packages/pxlrbt-filament-environment-indicator)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

118126.9k](/packages/stephenjude-filament-feature-flags)

PHPackages © 2026

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