# svelte-flagicon

> Svelte component for flag-icon-css

Latest version **0.2.0** (published 2020-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install svelte-flagicon
pnpm add svelte-flagicon
yarn add svelte-flagicon
bun add svelte-flagicon
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2020-05-12 |
| First published | 2020-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | dustbort |
| Maintainers | dustinbortner |
| Keywords | svelte, icons, svg, flag, country |

## Links

- npm: https://www.npmjs.com/package/svelte-flagicon
- Repository: https://github.com/dustbort/svelte-flagicon
- Homepage: https://github.com/dustbort/svelte-flagicon#readme
- Issues: https://github.com/dustbort/svelte-flagicon/issues
- npm.io page: https://npm.io/package/svelte-flagicon

## Dependencies (1)

- [uuid](https://npm.io/package/uuid.md) ^8.0.0

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2020-05-12
- 0.1.2 — 2020-05-12
- 0.1.1 — 2020-05-12
- 0.1.0 — 2020-05-12

## README

# Svelte FlagIcon Components

SVG icons designed by [lipis](https://github.com/lipis/flag-icon-css). Inspired by [alepop](https://github.com/alepop/svelte-cryptoicon).

# Installation

```
npm install svelte-flagicon
```

# Usage

```
<script>
  import { Us } from "svelte-flagicon";
</script>
<div>
  <Us />
</div>
```

You can import all the icons at once:

```
<script> 
  import * as Flags from "svelte-flagicon";
</script>
<div>
  <Flags.Us />
</div>
```

or include component from source folder:

```
<script>
  import Us from "svelte-flagicon/src/icons/Us.svelte
</script>
```

Icons can be configured with props:

```
<Us round square size="16" />
```

Props:

| Name | Type | Default | Purpose |
|------|------|---------|---------|
| round | boolean | false | Applies a mask to the flag to create a circular icon. |
| size | number | 32 | Sets the width of the icon in pixels. |
| square | boolean | false | Changes the aspect ratio from 4x3 to 1x1. |

---
_Source: https://npm.io/package/svelte-flagicon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
