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

@forward-software/react-native-flags-kit

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forward-software/react-native-flags-kit

React Native Flag component with all the flags in the world

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

react-native-flags-kit

React Native Flag component with all the flags in the world

license Build & Test Language grade: JavaScript Github Issues

npm NPM downloads

react-native-flags-kit-example.gif

Installation

yarn add @forward-software/react-native-flags-kit

Usage

import { Flag } from '@forward-software/react-native-flags-kit';

<Flag code="DE" size={32} />

Props

PropsTypeRequiredDefaultDescription
codestringYESThe ISO code of a flag, for example "KH", "US" or "GB".
typeflat or shinyNoshinyDisplay the flags with a shiny or flat effect.
size16, 24, 32, 48, 64 or numberNo64The size of a flag in points (Note: Setting a different size will render the closest one - e.g. 17 -> 16, 29 -> 32).
styleNoAllows additional RN Image styles to be passed through.

Full Example

import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';

import { Flag } from '@forward-software/react-native-flags-kit';

export const App: React.FC = () => (
  <View style={styles.container}>
    <Flag code="US" size={64} />
    <Flag code="JP" size={64} />
    <Flag code="CN" size={64} />
    <Flag code="RU" size={64} />
    <Flag code="KH" size={64} />
    <Flag code="VN" size={64} />
    <Flag code="SG" size={64} />
    <Flag code="MY" size={64} />
  </View>
);

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
    fontSize: 30,
  },
});

For a more complete example check the example folder.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Credits

This library is an update of react-native-flags-kit to make it work with latest React Native versions and fix old reported issues (e.g. #1)

License

MIT


Made with ✨ & ❤️ by ForWarD Software and contributors

If you found this project to be helpful, please consider contacting us to develop your React and React Native projects.

Keywords

FAQs

Package last updated on 10 Apr 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

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