Skip to content

webpack based - load only what you need - svg inline flags

Notifications You must be signed in to change notification settings

ceri-comps/ceri-flag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ceri-flag

webpack based - load only what you need - svg inline flags.
See ceri-icon if you need a svg inline icon.

Features:

  • plain JS - no dependencies

supports:

If you need other free flag sets, let me know..

Install

npm install --save-dev ceri-flag

Usage

// webpack.config.js
Flags = require("ceri-flag")
...
module.exports = {
  ...
  plugins:[
    ...
    new Flags(["flg-gb","sq-de"])
    ...
  ]
  ...
}
  • in your project
window.customElements.define("ceri-flag", require("ceri-flag"))
<ceri-flag name="flg-gb"></ceri-flag>

For examples see dev/.

Props

Name type default description
name String - (required) name of the icon
label String name aria-label
size Number (font-size) height of the icon in px
scale Number 1 size multiplier

Development

Clone repository.

npm install
npm run dev

Browse to http://localhost:8080/.

License

Copyright (c) 2016 Paul Pflugradt Licensed under the MIT license.

About

webpack based - load only what you need - svg inline flags

Resources

Stars

Watchers

Forks

Packages

No packages published