vamb / react-country-flag

React component for emoji/svg country flags.

Home Page:https://danalloway.github.io/react-country-flag/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-country-flag

React component for emoji/svg country flags.

NPM JavaScript Style Guide

Install

npm install --save react-country-flag

Usage

import React, { Component } from "react";

import ReactCountryFlag from "react-country-flag";

class Example extends Component {
    render() {
        return (
            <div>
                <ReactCountryFlag code="us" />
                <ReactCountryFlag code="us" svg />
                <ReactCountryFlag 
                    styleProps={{
                        width: '20px',
                        height: '20px'
                    }}
                    code="us"
                    svg
                />
            </div>
        );
    }
}

License

MIT © danalloway

About

React component for emoji/svg country flags.

https://danalloway.github.io/react-country-flag/


Languages

Language:JavaScript 98.3%Language:HTML 1.5%Language:CSS 0.2%