Description
vue-flag-icon is a Vue component that shows country flags. It is a wrapper for the flag-icon-css library, and you give it an ISO country code in the iso property to render the matching flag. The README lists a legacy install for Vue 2 and a separate install for Vue 3 and later. To use it, you register the component globally with the use directive, then place it in your templates. The iso value can be fixed or bound dynamically from an object in your data. Two additional props adjust the flag. The squared prop, added in version 1.0.4, renders a square flag when it is true, which is the default, and a rectangular flag when it is false. The title prop sets the flag's title, and when it is not given the title falls back to the iso code. The README includes a screenshot, a code example based on a basic Vue CLI template, and a section on the additional props. It is aimed at Vue developers who need country flags in their app.…
Highlights
- Country flag component for Vue
- Flag chosen by ISO code, bindable from data
- Square or rectangular flags
- Custom title prop
- Install paths for Vue 2 and Vue 3
Ratings & Reviews
No ratings yet
Be the first to rate vue-flag-icon.
People also visit

react-circle-flags
A React component with a collection of 300+ minimal circular SVG country flags
oh-vue-icons
Include inline SVG icons from different popular icon packs in Vue 2 & 3 easily

vue-material-design-icons
A collection of material design icons as Vue single file components
vue-flag-icon FAQ
What is vue-flag-icon?
A Vue component that displays a country flag from an ISO code, based on flag-icon-css.
Which Vue versions does it support?
The README lists a legacy install for Vue 2 and a separate install for Vue 3 and later.
How do I show a flag?
Register the component with the use directive, then pass the iso code, either fixed or bound from data.
Can I make the flag square?
Yes. The squared prop defaults to true, which renders a square flag. Set it to false for a rectangular flag.
How do I set the title?
Pass the title prop. If you leave it out, the title is the iso code.
What are the best vue-flag-icon alternatives?
Popular alternatives to vue-flag-icon include react-flags, GeoIcons and react-flagpack. See all vue-flag-icon alternatives














