Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

country-flags-for-react

rahman9537MIT1.0.0TypeScript support: included

Country Flags for React

react, country, flags, country-flag, icons, svg

readme

Country Flags for React

npm version npm minzipped size npm downloads

Inspired by react-flag-kit

Flag assets from country-flags 🌎

Installation

npm i country-flags-for-react
# or using Yarn
yarn add country-flags-for-react

Usage

import { CountryFlag } from "country-flags-for-react";

export const DeFlag = () => <CountryFlag code="DE" size={48} />; // 🇩🇪

export const GbFlag = () => <CountryFlag code="GB" size={48} />; // 🇬🇧

Reference

The list of available flags you can find in hampusborgos/country-flags repo.