> [!CAUTION] > THIS PROJECT ONLY CONTAINS A PATCH TO MAKE `react-flagpack` WORK WITH REACT 19. > > IF YOU ENCOUNTER ANY ISSUES, PLEASE REPORT THEM IN THE `react-flagpack` REPO. > # Flagpack Flagpack contains 250+ flag icons to easily use within your code project. Flagpack is an open source project and available for JavaScript frameworks/libraries React, Vue and Svelte. . Made with love by Yummygum. Graphic showing a list with the flags of Argentina, Croatia, Estonia, Kenia, Netherlands, and Scotland.](https://flagpack.xyz/meta-image.png) [View documentation on flagpack.xyz](https://flagpack.xyz/docs/) ## react-flagpack
Flagpack for React is created using React v16.8. The Flagpack component has not been tested for compatibility with older versions of React. ## Installation ```bash $: npm install react-flagpack --save ``` This package depends on the files being injected into the static folder of the project. React flagpack comes bundled with a CLI that will do this automatically for you, but you have to tell node to execute it. Add the following to the scripts in package.json *Note that postinstall sometimes doesn't run with certain package managers, so you may need to run it manually* ```json { "scripts": { // ...rest of your scripts "postinstall": "react-flagpack" }, "dependencies": { "react-flagpack": "^2.0.5" } } ``` This tool accepts the parameter "--framework" which can be used to pass the correct framework to it. The default selected framework supports NextJS, create-react-app, Remix. For Gastby support please provide the `--framework gatsby` option ## Usage ### Defining the component Import the Flagpack component into any of your project's React components. ```js import Flag from 'react-flagpack' // # Optional but required for props other than code & size to work. // Can also be imported in a css file using @import 'react-flagpack/dist/style.css'; import 'react-flagpack/dist/style.css' ``` ### Use in JSX ```jsx