PHPackages                             digitlimit/flag - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. digitlimit/flag

ActiveLibrary[Localization &amp; i18n](/categories/localization)

digitlimit/flag
===============

Laravel Flags.

v1.0.0(1y ago)012MITBladePHP ^8.2

Since May 25Pushed 1y agoCompare

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

READMEChangelogDependencies (5)Versions (3)Used By (0)

🇺🇸 digitlimit/flag
==================

[](#-digitlimitflag)

[![Latest Version on Packagist](https://camo.githubusercontent.com/36e2ccedd02bc4d299e99dee363a2e2857254c6572882ac883359c866e9f30d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64696769746c696d69742f666c61672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/digitlimit/flag)[![License: MIT](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/5e15eec40b354e8d531688282ae26803d7489c650fbe68fb7290911100e7a32c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f64696769746c696d69742f666c61672f74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/digitlimit/flag/actions)[![Total Downloads](https://camo.githubusercontent.com/893282f51ad773f6f3ad604d3c6257c308d3c64747411643a8dafc8751926e8c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f64696769746c696d69742f666c61672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/digitlimit/flag)

**digitlimit/flag** is a simple Laravel package that provides Blade and Livewire components for displaying SVG country flags in 1x1 (square) or 4x3 (rectangular) aspect ratios.

It comes bundled with a collection of country flag SVGs and makes rendering them as easy as using a Blade component.

---

🚀 Installation
--------------

[](#-installation)

Require the package using Composer:

```
composer require digitlimit/flag
```

No need to publish anything — the package auto-discovers and registers itself.

🧩 Usage
-------

[](#-usage)

The package provides Blade components for every country using ISO 3166-1 alpha-2 codes.

✅ Basic Usage
-------------

[](#-basic-usage)

```

```

🎨 Custom Classes (e.g., Tailwind CSS)
-------------------------------------

[](#-custom-classes-eg-tailwind-css)

You can apply custom classes to style the flags:

```

```

📐 Available Aspect Ratios
-------------------------

[](#-available-aspect-ratios)

1x1: Square flags 4x3: Traditional rectangular flags

🧪 Example Usage
---------------

[](#-example-usage)

```

    Nigeria

    United Kingdom

```

🌍 Supported Countries
---------------------

[](#-supported-countries)

All ISO 3166-1 alpha-2 country codes are supported (e.g., us, ng, gb, fr, de, etc.).

The flag assets are stored in:

```
resources/flags/1x1/
resources/flags/4x3/
```

Refer to this Wikipedia page for a full list of valid codes.

📦 Asset Publishing (Optional)
-----------------------------

[](#-asset-publishing-optional)

If you want to customize or reference the SVG files directly:

```
php artisan vendor:publish --tag=flag-assets
```

The files will be published to your public/vendor/flag directory.

❓ FAQ
-----

[](#-faq)

Q: What if a flag doesn’t show up?

Make sure: You’re using a valid ISO alpha-2 country code. The country code is lowercase (e.g., ng, us, de, not NG or Us).

Q: Can I use this in Livewire components? Yes! Blade components work seamlessly in Livewire views.

Q: Will this work with Tailwind CSS? Absolutely. Pass any Tailwind or custom class names via the class attribute.

🧪 Testing
---------

[](#-testing)

To run the tests:

```
composer test
```

Or with Pest:

```
./vendor/bin/pest
```

🛠️ Contributing
---------------

[](#️-contributing)

Contributions are welcome! Please fork this repository and submit a pull request:

- Fork the repo Create your feature branch (git checkout -b feature/your-feature)
- Commit your changes
- Push to the branch
- Create a new Pull Request

📄 License
---------

[](#-license)

This package is open-sourced software licensed under the MIT license.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance46

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

402d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2041419?v=4)[Emeka Mbah](/maintainers/digitlimit)[@digitlimit](https://github.com/digitlimit)

---

Top Contributors

[![digitlimit](https://avatars.githubusercontent.com/u/2041419?v=4)](https://github.com/digitlimit "digitlimit (14 commits)")

---

Tags

laravelcountriesflags

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/digitlimit-flag/health.svg)

```
[![Health](https://phpackages.com/badges/digitlimit-flag/health.svg)](https://phpackages.com/packages/digitlimit-flag)
```

###  Alternatives

[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.4k](/packages/typicms-base)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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