Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-flagkit

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-flagkit

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

  • 2.0.4
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5.5K
decreased by-36.91%
Maintainers
1
Weekly downloads
 
Created
Source

react-flagkit

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

Documentation

  • FlagKit Country Codes

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

FAQs

Package last updated on 01 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc