SVG Country Flags for React (Package Name)
This NPM package provides a collection of SVG country flags, optimized for React applications and written in TypeScript. It offers a simple and efficient way to include scalable, high-quality flag icons in your web projects.
- High-quality SVG flags for a wide range of countries.
- Easy integration with React projects.
- TypeScript support for type safety and autocompletion.
- Lightweight with minimal dependencies.
To install the package, run the following command in your project directory:
npm install @sikka/alam --saveImport the flag component in your React application:
import { SA } from '@sikka/alam';
const MyComponent = () => (
<div>
<SA />
</div>
);
export default MyComponent;| Prop | Type | Description | Required |
|---|---|---|---|
| countryCode | string | ISO Alpha-2 country code | Yes |
| width | string | Width of the flag (in pixels) | No |
| height | string | Height of the flag (in pixels) | No |
| className | string | Additional CSS class for styling | No |
We welcome contributions to this package. If you have a suggestion or fix:
- Fork the repository.
- Create a new branch (
git checkout -b feature/AmazingFeature). - Make your changes.
- Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a pull request.
Distributed under the MIT License. See LICENSE file for more information.
- The SVG files of the flags were taken from yammadev/flag-icons.