react-circle-flags

A React component with a collection of 300+ minimal circular SVG country flags

Usage no npm install needed!

<script type="module">
  import reactCircleFlags from 'https://cdn.skypack.dev/react-circle-flags';
</script>

README

react-circle-flags

React circle flags (based on circle-flags)

NPM JavaScript Style Guide codecov Node.js CI

Install

npm install --save react-circle-flags

Usage

import React from 'react'
import { CircleFlag } from 'react-circle-flags'

export const SpanishFlag = () => <CircleFlag countryCode="es" height="35" />

With custom CDN

import React from 'react'
import { CircleFlag } from 'react-circle-flags'

export const SpanishFlag = () => <CircleFlag countryCode="es" height="35" cdnUrl="https://magic-cdn.com/flags/" />

You can pass all the react's React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> props to CircleFlag. :rocket:

Docs && Gallery

Click here!

License

MIT © tnovau