Add flag component#2472
Conversation
|
what is the source of the flags? |
|
@hebbet I'll add it later if its approved |
|
why not before? |
|
I have downloaded all files flags from https://nucleoapp.com/svg-flag-icons |
|
Looks great! 🙂 Personally I think using country code feels like a lot easier/safer way to guarantee the right flag etc is shown. Different countries have their own spellings etc in different languages. Not to mention countries changing name, i.e Turkey becoming Türkiye. Maybe there could be a prop for alt text, in case one does need to pass in a country name for that? |
|
Hi @ghabriel25 Thanks for contributing. We're going to hold off on this for now. This is a rather large addition for something that some apps might never need. That said, if you strongly believe this should be part of Flux, upvote the discussion on this topic, which is currently sitting at only 2 upvotes: #1159. We're open to reconsider this if there's enough demand from community. Until then, there are multiple Laravel packages that solve this already, some mentioned in the discussion. |
|
@ganyicz I can agree that its large addition for something thats not often to be used. However, I hope there is a chance make this opt-in like Lucide icon, maybe something like php artisan flux:flag england |
|
That's a good idea and definitely something that should be considered. Make sure to mention this in the discussion so we can reference that when we consider adding this in the future. |
|
Hi, @ganyicz Just want to make sure. Should I create new PR or just use this branch? |
|
@ghabriel25 there are no plans to add the component at this time. Please upvote the discussion if you haven't yet and feel free to drop your ideas in there. We will come back to it when there's more demand for this feature. |

Adding flag components with the only property passed is
size="lg",size="xl"(defaultsize="base"). One of the component is like thisTotal size: 619 KB
Example of England's flag
Tested Locally
@calebporzio @joshhanley let me know if this is acceptable as I still working the remaining flags otherwise just close it. Thank you!
Note: still deciding if I should use country code instead name