Description
react-currency-flags is a React library of currency flag components, built with styled-components. It uses flag images from the transferwise/currency-flags project, and each flag is selected by its three-letter ISO 4217 currency code. You choose a size from the predefined values sm, md, lg and xl, or set a width or height, and the other dimension is calculated to keep the aspect ratio. If you set size together with width or height, size takes precedence. The README warns that the images are stored as base64, so the bundle can grow large. For bundle-size concerns it suggests cloning the upstream repository and hosting the flag images on a CDN you control, since installing the upstream package directly will not work that way. The README also explains why it uses images rather than SVG: some flags, such as Mexico's, are very complicated, and SVG versions would be very large files. Installation works with Yarn or npm, and examples are in the project's examples folder. It is aimed at React developers who need currency flags in an app.…
Highlights
- Currency flags as React components
- Lookup by ISO 4217 currency code
- Predefined sizes or custom width and height
- Built with styled-components
- Install with Yarn or npm
Ratings & Reviews
No ratings yet
Be the first to rate react-currency-flags.
People also visit

react-circle-flags
A React component with a collection of 300+ minimal circular SVG country flags
react-currency-flags FAQ
What is react-currency-flags?
A React library of currency flag components, built with styled-components, that you select by currency code.
How do I pick a flag?
Pass the currency prop as a three-letter ISO 4217 code.
What sizes can I use?
Use one of the size values sm, md, lg or xl, or set width or height. Size takes precedence if you set several.
Why images instead of SVG?
The README says some flags, such as Mexico's, are very complicated, so SVG files would be very large.
Does it make my bundle large?
The README says the images are base64, so bundle size can grow. It suggests hosting the images on your own CDN.
What are the best react-currency-flags alternatives?
Popular alternatives to react-currency-flags include react-flags, react-flagpack and react-circle-flags. See all react-currency-flags alternatives


















