react-country-flags-lazyload
TypeScript icon, indicating that this package has built-in type declarations

1.0.9 • Public • Published

React Country Flag

The ReactCountryFlag component is a reusable React component that displays a country flag based on a given ISO 3166-1 alpha-2 country code.

Installation

yarn add react-country-flags-lazyload

Usage

To use the ReactCountryFlag component in your React application, you can import it and render it like any other React component:

import CountryFlag from 'react-country-flags-lazyload';

function MyComponent() {
  return <CountryFlag countryCode="US" />;
}

The countryCode prop is required, and should be a valid ISO 3166-1 alpha-2 country code (e.g. "US" for the United States, "CA" for Canada, "GB" for the United Kingdom).

License

The CountryFlag component is licensed under the MIT License.

/react-country-flags-lazyload/

    Package Sidebar

    Install

    npm i react-country-flags-lazyload

    Weekly Downloads

    86

    Version

    1.0.9

    License

    MIT

    Unpacked Size

    8.67 MB

    Total Files

    1031

    Last publish

    Collaborators

    • n3manja87
    • bojanwd