Socket
Socket
Sign inDemoInstall

react-country-flag

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-country-flag

> React component for emoji/svg country flags.


Version published
Weekly downloads
157K
increased by1.02%
Maintainers
1
Weekly downloads
 
Created

What is react-country-flag?

The react-country-flag npm package is a simple React component for displaying country flags. It provides an easy way to include SVG or emoji representations of country flags in your React applications.

What are react-country-flag's main functionalities?

Display SVG Flag

This feature allows you to display the SVG representation of a country's flag by specifying the country code and setting the 'svg' prop.

<CountryFlag countryCode="US" svg />

Display Emoji Flag

This feature allows you to display the emoji representation of a country's flag by specifying the country code without the 'svg' prop.

<CountryFlag countryCode="US" />

Custom Styles

This feature allows you to apply custom styles to the flag component by passing a style object.

<CountryFlag countryCode="US" style={{ width: '50px', height: '50px' }} />

Custom Class Names

This feature allows you to apply custom class names to the flag component for additional styling options.

<CountryFlag countryCode="US" className="custom-class" />

Other packages similar to react-country-flag

FAQs

Package last updated on 31 Mar 2023

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