Topic: Is it possible to use a flag icon in a select option with text

jimscottjr free asked 4 years ago


Expected behavior

I would like to view a flag icon along with text in a select drop down option

Actual behavior

Flag icons do not show in a select drop down option

Resources (screenshots, code snippets etc.)

Something like this:

<option value='+1' selected ><i class='us flag'></i> US (+1)</option>

belu pro answered 4 years ago


Would be great, if it worked. I guess, that dropdowns for language or country selection are a very common thing.

Best,


Marcin Luczak staff commented 4 years ago

Hello belu,

Unfortunately, this is not supported yet, but as long as it seems valuable functionality to have, I created an appropriate feature request. Thank you for your question.

Regards, Marcin


Mateusz Łubianka staff answered 4 years ago


Hi @jimscottjr,

You can use icons in Select in this way:

<option value="1" data-fas="star">Option 1</option>

But unfortunately it will not work with flags.

Best,



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.15.0
  • Device: Macbook Pro
  • Browser: both Safari and Chrome
  • OS: macOS ctalina 10.15.2
  • Provided sample code: No
  • Provided link: No
Tags