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

react-world-flags

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-world-flags

SVG flags of the world for react

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24K
decreased by-9.33%
Maintainers
1
Weekly downloads
 
Created
Source

react-world-flags

Easy to use SVG flags of the world for react

Demo

Installation

npm install react-world-flags

Usage

import Flag from 'react-world-flags'

<Flag code={ code } />

Where code is the two letter, three letter or three digit country code.

You can also pass an optional fallback which renders if the given code doesn't correspond to a flag:

import Flag from 'react-world-flags'

<Flag code="foo" fallback={ <span>Unknown</span> }/>

All props but code and fallback are passed through to the rendered img

<Flag code="nor" height="16" />

// <img src="data:image/svg+xml..." height="16">

Caveat

The bundle contains all flags of the world and is about 1.3 MB gzipped.

SVG's are inlined using Data_URIs.

Keywords

FAQs

Package last updated on 04 Feb 2019

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