flags-react

1.0.3 • Public • Published

The World Flag Icons for React

A collection of all country flags in SVG --- plus the CSS for easier integration. (1:1 & 4:3 ratios)

Forked from https://github.com/lipis/flag-icon-css

Installation

npm install flags-react

Usage

import Flag from 'flags-react'
 
function App(){
    return (
        <div>
            <Flag iso="US"/>
            <Flag iso="us" squared /> 
            <Flag code="us" />
            <span className='flag-icon flag-icon-us'></span>
        </div>
    )
}
 

You could also apply this to any element, but in that case you'll have to use the flag-icon-background className instead of flag-icon and you're set.

Dependents (0)

Package Sidebar

Install

npm i flags-react

Weekly Downloads

12

Version

1.0.3

License

ISC

Unpacked Size

4.82 MB

Total Files

520

Last publish

Collaborators

  • elis-k