All Projects → jackiboy → flagpack

jackiboy / flagpack

Licence: other
A lightweight flag icon toolkit for the web.

Programming Languages

SCSS
7915 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to flagpack

Circle Flags
A collection of 300+ minimal circular SVG country flags
Stars: ✭ 139 (+172.55%)
Mutual labels:  country, countries, svg-icons, flags
Bootstrap Cookie Alert
A simple, good looking cookie alert built for Bootstrap 3/4. No dependencies required.
Stars: ✭ 165 (+223.53%)
Mutual labels:  lightweight, small
Bytesize Icons
Tiny style-controlled SVG iconset (101 icons, 12kb)
Stars: ✭ 3,662 (+7080.39%)
Mutual labels:  lightweight, svg-icons
country-flags
A small package to convert a country code to the corresponding country flag emoji
Stars: ✭ 27 (-47.06%)
Mutual labels:  countries, flags
docker-alpine-wkhtmltopdf
wkhtmltopdf alpine docker container with headless qt patches
Stars: ✭ 150 (+194.12%)
Mutual labels:  lightweight, small
StringDB
StringDB is a modular, key/value pair archival DB designed to consume *tiny* amounts of ram & produce *tiny* databases.
Stars: ✭ 56 (+9.8%)
Mutual labels:  lightweight, small
Wolff
🐺 Lightweight and easy to use framework for building web apps.
Stars: ✭ 203 (+298.04%)
Mutual labels:  lightweight, small
Laravel Country State
A helper to list countries & states in English in Laravel 5.1+
Stars: ✭ 77 (+50.98%)
Mutual labels:  country, countries
CalDOM
An agnostic, reactive & minimalist (3kb) JavaScript UI library with direct access to native DOM.
Stars: ✭ 176 (+245.1%)
Mutual labels:  lightweight, small
Nager.Country
Worldwide Country Informations (ISO-3166-1 Alpha2, ISO-3166-1 Alpha3, ISO 639-1)
Stars: ✭ 68 (+33.33%)
Mutual labels:  country, countries
SquareImageView
SquareImageView is a simple wrapper library for Android ImageView
Stars: ✭ 28 (-45.1%)
Mutual labels:  square, rectangle
cli
a lightweight and simple cli package
Stars: ✭ 12 (-76.47%)
Mutual labels:  lightweight, flags
PhoneCountryCodePicker
An iOS tableview picker for PhoneCountryCode (English & Chinese supported)
Stars: ✭ 31 (-39.22%)
Mutual labels:  country, flags
Wondercms
WonderCMS - fast and small flat file CMS (5 files)
Stars: ✭ 330 (+547.06%)
Mutual labels:  lightweight, small
Country Ip Blocks
CIDR country-level IP data, straight from the Regional Internet Registries, updated hourly.
Stars: ✭ 100 (+96.08%)
Mutual labels:  country, countries
Redux Zero
A lightweight state container based on Redux
Stars: ✭ 1,977 (+3776.47%)
Mutual labels:  lightweight, small
Country Json
A simple data of the world by country each in JSON format.
Stars: ✭ 688 (+1249.02%)
Mutual labels:  country, countries
Countries States Cities Database
🌍 World countries, states, regions, provinces, cities, towns in JSON, SQL, XML, PLIST, YAML, and CSV. All Countries, States, Cities with ISO2, ISO3, Country Code, Phone Code, Capital, Native Language, Timezones, Latitude, Longitude, Region, Subregion, Flag Emoji, and Currency. #countries #states #cities
Stars: ✭ 1,130 (+2115.69%)
Mutual labels:  country, countries
ytmous
Anonymous Youtube Proxy
Stars: ✭ 60 (+17.65%)
Mutual labels:  lightweight, small
smooth-corners
CSS superellipse masks using the Houdini API
Stars: ✭ 133 (+160.78%)
Mutual labels:  square, rectangle

Flagpack

A lightweight flag icon toolkit for the web

Flagpack Screenshot

visit site

Install

flagpack can be installed with npm.

npm install flagpack 

Use in your project

CSS

you can import the built css file directly into your project. this will include all the css classes & flag icons.

examples

Default flag: bo is the country code (Bolivia 🇧🇴 is used in these examples).

<span class="fp bo"></span>

medium:

<span class="fp fp-md bo"></span>

large:

<span class="fp fp-lg bo"></span>

rounded:

<span class="fp fp-rounded bo"></span>

square variant:

<span class="fp fp-square bo"></span>

visit flag.pk to quickly copy your countries code for your project.


SASS

Flagpack is built with SASS (SCSS). There are a few variables that are !default so that you can override them easily.

Set custom prefix:
Set the class prefix (the default is fp).

$fp-prefix: 'fp' !default;

Prepend Prefix:
Prepend the prefix to the country code e.g. fp-bo instead of bo (the default is set to false).

$fp-prepend: false !default;

Set default icon size:
This will also mofify the fp-md, fp-lg & fp-rounded sizes.

$fp-size: 1em !default;

Size Helpers:
By default Flagpack has a medium .md and large .lg helper class. you can disable generating these size classes if you don't need them.

$fp-size-md: true !default;
$fp-size-lg: true !default;

Countries:
If you would like to include only a few countries you can override this variable. Just Include the country codes you want.

$fp-countries: "ac", "ad", "ae", "af", "ag", "ai", "al", "am", "ao", "ar", "as",
  "at", "au", "aw", "ax", "az", "ba", "bb", "bd", "be", "bf", "bg", "bh", "bi",
  "bj", "bl", "bm", "bn", "bo", "bq", "br", "bs", "bt", "bv", "bw", "by", "bz",
  "ca", "cc", "cd", "cf", "cg", "ch", "ci", "ck", "cl", "cm", "cn", "co", "cr",
  "cu", "cv", "cw", "cx", "cy", "cz", "de", "dj", "dk", "dm", "do", "dz", "ec",
  "ee", "eg", "eh", "er", "es", "et", "eu", "fi", "fj", "fk", "fm", "fo", "fr",
  "ga", "gb-eng", "gb-nir", "gb-sct", "gb-wls", "gb-zet", "gb", "gd", "ge", "gf",
  "gg", "gh", "gi", "gl", "gm", "gn", "gp", "gq", "gr", "gs", "gt", "gu", "gw",
  "gy", "hk", "hm", "hn", "hr", "ht", "hu", "id", "ie", "il", "im", "in", "io",
  "iq", "ir", "is", "it", "je", "jm", "jo", "jp", "ke", "kg", "kh", "ki", "km",
  "kn", "kp", "kr", "kw", "ky", "kz", "la", "lb", "lc", "lgbt", "li", "lk", "lr",
  "ls", "lt", "lu", "lv", "ly", "ma", "mc", "md", "me", "mf", "mg", "mh", "mk",
  "ml", "mm", "mn", "mo", "mp", "mq", "mr", "ms", "mt", "mu", "mv", "mw", "mx",
  "my", "mz", "na", "nc", "ne", "nf", "ng", "ni", "nl", "no", "np", "nr", "nu",
  "nz", "om", "pa", "pe", "pf", "pg", "ph", "pk", "pl", "pm", "pn", "pr", "ps",
  "pt", "pw", "py", "qa", "re", "ro", "rs", "ru", "rw", "sa", "sb", "sc", "sd",
  "se", "sg", "sh", "si", "sj", "sk", "sl", "sm", "sn", "so", "sr", "ss", "st",
  "sv", "sx", "sy", "sz", "ta", "tc", "td", "tf", "tg", "th", "tj", "tk", "tl",
  "tm", "tn", "to", "tr", "tt", "tv", "tw", "tz", "ua", "ug", "um", "us", "uy",
  "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu", "wf", "ws", "xk", "ye", "yt",
  "za", "zm", "zw" !default;

Enable/Disable Formats:
You can optionally turn off flag formats if you would only like to use one format (both formats are enabled by default).

$fp-enable-4x3: true !default;
$fp-enable-1x1: true !default;
$fp-enable-rounded: true !default;

Flag SVG paths:
You will always need to override these variables if you are going to use the sass files directly in your project.

  • $fp-4x3-path is for the 4x3 (rectangle) formats.
  • $fp-1x1-path is for the 1x1 (square) formats.
$fp-4x3-path: '../flags/4x3/' !default;
$fp-1x1-path: '../flags/1x1/' !default;

Why use this library?

Most flag libraries out there either use low quality png's or overly complex svg's that don't scale down well. Flagpack is around 125kb gzipped this is including all the svgs (both 1x1 and 4x3 formats) plus the css. making it about 10x smaller than flag-icon-css.

Using only 1x1 or 4x3 formats will reduce the size to around 60kb.

Credits

flagpack uses the flagkit as the base for it's icons plus a few custom additions. if you are looking for flags for IOS & Android please use this library.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].