Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

pixlerlab2020/react-flagkit

Repository files navigation

react-flagkit

Beautiful flag icons for usage in React webapps. All flags are provided as importable images by React.

Documentation

Installation

npm install --save react-flagkit

Usage

import Flag from 'react-flagkit';
export default () => <Flag country="US" />;

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="GB" 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

  • madebybowtie for FlagKit
  • jsDelivr for free CDN access

About

πŸ³οΈβ€πŸŒˆ React wrapper for FlagKit Flag Icons

Resources

License

Security policy

Stars

Watchers

Forks

Packages

Contributors

Languages

  • HTML 68.9%
  • JavaScript 13.6%
  • CSS 8.8%
  • TypeScript 8.7%

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /