Releases: MohmmedAshraf/blade-flags
js-v0.1.3
Fix
- Fix flag components not respecting CSS size classes (
size-4,shrink-0, etc.)- Strip hardcoded
width/heightfrom SVGs, usewidth:100%;height:100%so the SVG fills its container - Add
display:inline-flexto the span wrapper
- Strip hardcoded
Affected packages: @blade-flags/core, @blade-flags/react, @blade-flags/vue
v1.6.1
This package aims for broad compatibility by mirroring upstream flag collections. Inclusion of any flag does not imply endorsement. The author of this package stands with Palestine (the Palestine flag is featured in the project cover). If you want to exclude specific flags, you can do so in your application/UI, or exclude them during the build via bin/build.sh.
JS v0.1.2
This package aims for broad compatibility by mirroring upstream flag collections. Inclusion of any flag does not imply endorsement. The author of this package stands with Palestine (the Palestine flag is featured in the project cover). If you want to exclude specific flags, you can do so in your application/UI, or exclude them during the build via bin/build.sh.
v1.6.0
What's New
Circle & Flat Flag Variants
The package now ships with three flag styles — 1,759 flags total:
| Variant | Component | Countries | Languages |
|---|---|---|---|
| Default (rounded) | <x-flag-country-us /> |
264 | 281 |
| Circle | <x-flag-circle-country-us /> |
405 | 275 |
| Flat (4:3) | <x-flag-flat-country-us /> |
270 | 264 |
Language Flag Overrides
Override default language-to-country mappings via config:
// config/blade-flags.php
'language_overrides' => [
'ar' => ['default' => 'sa'],
'en' => ['default' => 'us'],
],JavaScript Packages
The same flags are now available as npm packages for Vue, React, and vanilla JS:
@blade-flags/core— SVG strings as tree-shakeable JS modules@blade-flags/vue—<Flag>component for Vue 3@blade-flags/react—<Flag>component for React 18+
npm install @blade-flags/core @blade-flags/vueFull Changelog: 1.5.4...1.6.0
JS v0.1.1
Fixed
- Add README files to npm packages
JS v0.1.0
Initial Release — JavaScript Packages
First release of the JavaScript flag packages, providing the same 1,759 SVG flags from blade-flags as tree-shakeable JS modules.
Packages
| Package | Description |
|---|---|
@blade-flags/core |
SVG strings as JS modules + resolveFlag() helper |
@blade-flags/vue |
<Flag> component for Vue 3.3+ |
@blade-flags/react |
<Flag> component for React 18+ |
Installation
npm install @blade-flags/core @blade-flags/vue # Vue
npm install @blade-flags/core @blade-flags/react # React
npm install @blade-flags/core # Vanilla JSTree-Shaking
Every flag is a named export — import only what you need:
import { countryUs, countryGb } from '@blade-flags/core/flags/circle'Or use the full variant map for dynamic runtime lookup:
import { circleFlags } from '@blade-flags/core/flags/circle'
import { resolveFlag } from '@blade-flags/core'
const svg = resolveFlag(circleFlags, 'us')v1.5.4
What's Changed
- Add home nation country flags by @michaeljmeadows in #26
New Contributors
- @michaeljmeadows made their first contribution in #26
Full Changelog: 1.5.3...1.5.4
v1.5.3
v1.5.2
1.5.1
What's Changed
- Fix a typo in the README file. by @hackedhorizon in #19
- Flag catalan language-ca by @adriallongarriu in #18
New Contributors
- @hackedhorizon made their first contribution in #19
- @adriallongarriu made their first contribution in #18
Full Changelog: 1.5.0...1.5.1