0.9.1 • Published 5 months ago

cute-countries-react v0.9.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

cute-countries-react

Beautiful country flag icons for React. All flags are provided as importable images by React.

Documentation and Playground

Available Icons

  • All available icons can be found here.

Installation

npm install --save cute-countries-react

or

yarn add cute-countries-react

Usage

import Flag from 'cute-countries-react';

Displays the flag of the United States (US)

<Flag country="us" />

Component can render different flags by country, a list of all codes can be found here.

<Flag country="de" />

It's also possible to make those flags whatever pixel size you want.

Big

<Flag country="ca" size={84} />

or small

<Flag country="uk" size={15} />

If needed you can also make the flag interactive with an onClick handler, just make sure to change the role to button

<Flag
  country="se"
  role="button"
  onClick={() => {
    alert('You just clicked on the flag.');
  }}
/>

Thanks

0.9.1

5 months ago

0.9.0

5 months ago