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

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

sablesoft/yii2-flags
====================

Flags asset for yii2 application

v1.0.0(5y ago)06LGPL-3.0+PHPPHP &gt;=7.2

Since Jul 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sablesoft/yii2-flags)[ Packagist](https://packagist.org/packages/sablesoft/yii2-flags)[ RSS](/packages/sablesoft-yii2-flags/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Yii2 Flags
==========

[](#yii2-flags)

Yii2 Asset Bundle for country flags rendering.

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

[](#installation)

The preferred way to install is through [composer](http://getcomposer.org/download/).

Either run

```
composer require sablesoft/yii2-flags

```

or add

```
"sablesoft/yii2-flags": "*",
```

to the require section of your composer.json.

Usage
-----

[](#usage)

For using the flags inline with text add the classes `.flag-icon` and `.flag-icon-xx` (where `xx` is the [ISO 3166-1-alpha-2 code](https://www.iso.org/obp/ui/#search/code/)of a country) to an empty ``. If you want to have a squared version flag then add the class `flag-icon-squared` as well. Example:

```

```

You could also apply this to any element, but in that case you'll have to use the `flag-icon-background` instead of `flag-icon` and you're set. This will add the correct background with the following CSS properties:

```
background-size: contain;
background-position: 50%;
background-repeat: no-repeat;
```

Which means that the flag is just going to appear in the middle of an element, so you will have to set manually the correct size of 4 by 3 ratio or if it's squared add also the `flag-icon-squared` class.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

2137d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d9b0f205c28816c7412e64ffc94536e0c7e796bcf1b2066caea1c6167cb2c0f?d=identicon)[sablesoft](/maintainers/sablesoft)

---

Top Contributors

[![sablesoft](https://avatars.githubusercontent.com/u/13505325?v=4)](https://github.com/sablesoft "sablesoft (1 commits)")

---

Tags

flagsyii2assetsablesoft

### Embed Badge

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

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

###  Alternatives

[nizsheanez/yii2-asset-converter

Less, Sass, Scss and Phamlp converter for Yii2. No system requires. yii2-composer support, Less autoupdate, customizing of output directory

64167.5k6](/packages/nizsheanez-yii2-asset-converter)

PHPackages © 2026

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