PHPackages                             agatanga/flags - 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. [Templating &amp; Views](/categories/templating)
4. /
5. agatanga/flags

ActiveLibrary[Templating &amp; Views](/categories/templating)

agatanga/flags
==============

Country flags in SVG format for Laravel application.

1.3.0(1mo ago)748.7k↓70.6%2MITPHPPHP ^7.3|^8.0

Since Dec 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/agatanga/flags)[ Packagist](https://packagist.org/packages/agatanga/flags)[ Docs](https://github.com/agatanga/flags)[ RSS](/packages/agatanga-flags/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (8)Versions (15)Used By (0)

Flags
=====

[](#flags)

Country flags in SVG format for your Laravel application. Uses [lipis/flag-icons](https://github.com/lipis/flag-icons) icons under the hood.

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

[](#installation)

```
composer require agatanga/flags
```

Usage
-----

[](#usage)

### Directive

[](#directive)

```
// Render flag using default ratio:
@flag('us')

// Tell what ratio to use, which classes, and attributes to add to the svg element:
@flag('us:1x1', 'w-64', ['id' => 'flag-us'])
```

### Helper

[](#helper)

```
// Render flag using default ratio:
{{ flag('us') }}

// Tell what ratio to use, which classes, and attributes to add to the svg element:
{{ flag('us:1x1', 'w-64', ['id' => 'flag-us']) }}
```

Configuration
-------------

[](#configuration)

You may configure the default ratio to use, and default css classes to add:

```
php artisan vendor:publish --provider="Agatanga\Flags\FlagsServiceProvider"
vi config/flags.php
```

Credits
-------

[](#credits)

- [lipis/flag-icons](https://github.com/lipis/flag-icons) - Wonderful SVG flags.
- [blade-ui-kit/blade-icons](https://github.com/blade-ui-kit/blade-icons) - Code and Idea.

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance92

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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

Every ~153 days

Recently: every ~236 days

Total

14

Last Release

39d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1108bccc259ec1b0fc93f04a182965faf1213460894ee297f1acf3482e3296ac?d=identicon)[vovayatsyuk](/maintainers/vovayatsyuk)

---

Top Contributors

[![vovayatsyuk](https://avatars.githubusercontent.com/u/306080?v=4)](https://github.com/vovayatsyuk "vovayatsyuk (18 commits)")[![BrekiTomasson](https://avatars.githubusercontent.com/u/7026735?v=4)](https://github.com/BrekiTomasson "BrekiTomasson (1 commits)")[![korridor](https://avatars.githubusercontent.com/u/26689068?v=4)](https://github.com/korridor "korridor (1 commits)")[![VincentBean](https://avatars.githubusercontent.com/u/3906942?v=4)](https://github.com/VincentBean "VincentBean (1 commits)")

---

Tags

country-flagsflagsiconslaravellaravel-packagesvg-flagslaravelsvgbladeflags

### Embed Badge

![Health badge](/badges/agatanga-flags/health.svg)

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

###  Alternatives

[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)[blade-ui-kit/blade-icons

A package to easily make use of icons in your Laravel Blade views.

2.5k42.5M404](/packages/blade-ui-kit-blade-icons)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[illuminate/view

The Illuminate View package.

13047.0M2.2k](/packages/illuminate-view)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)

PHPackages © 2026

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