Skip to content

Venediktoff/react-flags

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Flags

A tree-shakable React library for displaying world flags as SVG components.

🚀 Features

  • Tree-shaking support – Only import the flags you need
  • Optimized for performance – No unnecessary dependencies
  • Easy to use – Simple React components
  • SVG-based – High-quality, scalable flags

📦 Installation

npm install @venediktoff/react-flags

or with Yarn:

yarn add @venediktoff/react-flags

📖 Usage

Import only the flags you need:

import React from 'react';
import { FlagUS } from '@venediktoff/react-flags';

const App = () => (
  <div>
    <FlagUS />
  </div>
);

export default App;

🛠 Setup & Development

1. Clone the Repository

git clone https://github.com/venediktoff/react-flags.git
cd react-flags

2. Install Dependencies

npm install

🏗️ How It Works

Each flag is exported individually to allow tree-shaking, meaning only the imported flags are included in the final bundle.

📜 Available Flags

Flags are named using their ISO 3166-1 alpha-2 country codes. Example:

import { FlagUS } from '@venediktoff/react-flags';

For a full list of supported flags, check the flags directory.

📄 License

MIT License. See LICENSE for details.


Made with ❤️ by Ivan Venediktov

Releases

No releases published

Packages

No packages published