Vue Flags

This simple Vue component allows you to render a flag image by simply passing the ISO2 country code. For example if you want to see the US flag you would do the following:

// somepage.vue
<script setup lang="ts">
import { Flag } from '@juicyllama/vue-flags'
</script>

<template>
<Flag country_code="US" />
</template>

Props

NameTypeDescription
country_codestringISO2 country code
image_typeFlagImageTypesvg or png
typeFlagTyperound, square, rectangular, hexagonal, rounded_square, rounded_rectangle
classesstring[]Any classes you want to inject into the image's class property
sizeobjectAn object containing width and height details (e.g. 32px or 1rem)

Licensing

You must own a Flaticon Premium plan to use the images without attribution

If you do not have a flaticon premium plan, the following restrictions apply:

FREE LICENSE (WITH ATTRIBUTION)

This license allows you to use for free any of Flaticon contents for your projects as long as they are attributed to their author in the definitive project".

How to attribute contents?

  • For web usage: By placing a link with the text "designed by {Author's Name} from Flaticon" in a visible spot, so the author's authorship is noticeable.
  • Uses different to web: If possible, the text "designed by {Author's Name} from Flaticon" must be written next to Flaticon Contents, if it's not possible, the attribution must be placed in the credits or acknowledgements section.

Where you can use Flaticon contents:

  • Website.
  • Software, applications, mobile, Multimedia
  • Printed and digital media (magazines, newspapers, books, cards, labels, CD, television, video, e-mail). - Advertisement and promotional items.
  • Presentation of products and public events.

What you CAN DO:

  • You have the non-exclusive, non-transferable, non-sublicensable right to use the licensed material an unlimited number of times in any and all media for the commercial or personal purposes listed above.
  • You may alter and create derivative works.
  • You can use Flaticon Contents during the rights period world widely.

What you CAN NOT DO:

  • Sublicense, sell or rent any contents (or a modified version of them).
  • Distribute Flaticon Contents unless it has been expressly authorized by Flaticon.
  • Include Flaticon Contents in an online or offline database or file.
  • Offering Flaticon Contents designs (or modified Flaticon Contents versions) for download.

The complete content of licenses can be consulted on the Terms of Use, that will prevail over the content of this document.


Docs v.0.14.0 Copyright © 2024