react-countryname-flag
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

react-countryname-flag

NPM version Build npm-typescript License

Installation:

npm install react-countryname-flag --save-dev

or

yarn add -D react-countryname-flag

Usage :

  • Get country flag from country name

import { CountryFlag } from 'react-countryname-flag'

<CountryFlag countryName={'Afghanistan'} style={{ fontSize: '20px' }} />

  🇦🇫

  • Get country flag from country code

import { CountryFlag } from 'react-countryname-flag'

<CountryFlag countryCode={'AG'} />

  🇦🇬

  • Get country code from country name

import { CountryCode } from 'react-countryname-flag'

<CountryCode countryName={'Afghanistan'} />

  // AF

  • Get country name from country code

import { CountryName } from 'react-countryname-flag'

<CountryName countryCode={'AG'} />

  // Antigua and Barbuda

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.4
    2
    • latest

Version History

Package Sidebar

Install

npm i react-countryname-flag

Weekly Downloads

2

Version

1.1.4

License

MIT

Unpacked Size

165 kB

Total Files

29

Last publish

Collaborators

  • goodnews-sandy