New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@markrabey/react-native-flags

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markrabey/react-native-flags

A React Native component to display country flags with the ISO 3166-1 Standard.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

React Native Flags npm (scoped)

A React Native component to display country flags with the ISO 3166-1 alpha 2 Standard.

Table of Contents:

Installation

yarn add @markrabey/react-native-flags

Usage

import {View} from 'react-native';
import Flag from '@markrabey/react-native-flags';

function App() {
  return (
    <View>
      <Flag countryCode="CA" />
      <Flag countryCode="CA" variant="flat" />
      <Flag countryCode="CA" size="14" />
    </View>
  );
}

Props

PropRequiredOptionsDefault
countryCodeYesISO-3166-1 alpha-2 Country Code
variantNoemoji , flat - see Variants for detailsemoji
sizeNonumber14

Variants

Variants offer different styles of flags.

emoji - displays the standard flag emoji. The appearance the flags depends on the operating system's use of emojis.

flat - displays a .png of the flag with a flat style

Future Versions

React Native Flags is in active development with new features planned or being considered:

  • Additional variants, including a 3d style
  • Color variants - currently planning to offer color or black and white
  • Replace .png files with .svg for better scaling and smaller package size
  • New flags to be added:
    • LGBT
    • Canadian Provinces
    • US States
    • Unofficial or dissolved countries
    • Fantasy worlds (Star Wars, LOTR, etc.)

License

MIT license @ Mark Rabey

FAQs

Package last updated on 18 Mar 2022

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