agatanga/flags

Country flags in SVG format for Laravel application.
50,212 7
Install
composer require agatanga/flags
Latest Version:1.3.0
PHP:^7.3|^8.0
License:MIT
Last Updated:May 26, 2026
Links: GitHub  ·  Packagist
Maintainer: vovayatsyuk

Flags

Country flags in SVG format for your Laravel application. Uses lipis/flag-icons icons under the hood.

Installation

composer require agatanga/flags

Usage

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

// 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

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

Related Packages

clntdev/blade-payment-icons

Laravel Blade components for SVG credit card and payment icons

1,740 0
tumutech/laravel-qr-code

Generate branded, scan-safe QR codes in Laravel with center logos, style templat...

7 0
blade-ui-kit/blade-icons

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

51,769,151 2,481
outhebox/blade-flags

A package to easily make use of country & language flags in your Laravel Blade v...

994,395 310
abduns/laravel-qrcode

Laravel 12/13 bridge for abduns/qrcode: Facade, Blade, response()->qrcode(), and...

179 0