
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
vue-flag-icon
Advanced tools
a Vue2 Compoment for flag-icon
npm i --save vue-flag-icon
Just declare the global Compoment with the use directive in your app
import FlagIcon from 'vue-flag-icon'
Vue.use(FlagIcon);
Then to use it
<template>
<div>
...
<flag iso="it" />
<flag iso="gb" />
<flag iso="us" />
...
</div>
</template
To see a full set of all the icons and countries iso codes visit the flag-icon-css website. There are 246 different icons there.
Being svg files they are resizable as long as you set the font size accordingly in a wrapper element
<div style="font-size:180px">
<flag iso="it" />
</div>
The property iso can be as well dynamically set from an object
let guy = {
name: "Vincenzo",
nationality: "it"
}
in the Compoment you should dynamically bind the value
<flag :iso="guy.nationality" />
(it is the basic vue-cli webpack template)
<template>
<div id="app">
<img src="./assets/logo.png">
<hello></hello>
<flag iso="it" />
<flag iso="gb" />
<flag iso="us" />
</div>
</template>
<script>
import Hello from './components/Hello'
export default {
name: 'app',
components: {
Hello
}
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
From 1.0.4 you can now specify two different properties:
FAQs
vue flag icon component
The npm package vue-flag-icon receives a total of 5,147 weekly downloads. As such, vue-flag-icon popularity was classified as popular.
We found that vue-flag-icon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.