Inputs.table_County code to country icon

Matt Dzugan ran into the same problem in Making Maps out of Emojis / Matt Dzugan / Observable (related discussion).

You could embed the icons as SVGs from yammadev/flag-icons, e.g.:

flag = code => html`<img src="https://raw.githubusercontent.com/yammadev/flag-icons/v3.0.0/svg/${code}.svg">`
flag("US")

3 Likes