This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
We were not able to find the expected elm-package.json file at this tag.
Tag 1.1.0
Committed At 2020-07-11 11:01:46 UTC




    A searchable ISO 3166-1 based list of country names, codes and emoji flags

    The library is intended to be used qualified (i.e., Countries.all).

    > import Countries
    > Countries.fromCode "AU"
    Just { name = "Australia", code = "AU", flag = "🇦🇺" }
        : Maybe.Maybe Countries.Country

    Updates to this package are only made after the ISO 3166-1 standard is officially updated.

    Note: Country names do change! It's best to use the code as a key if you are using and storing country details outside of this library.

    Modifying the data set

    ISO 3166 is based on United Nations data (source).

    While this library sticks to the official data set, there are disputes, and you may wish to adjust the data as appropriate for your own use case.

    Here's how you can define your own countries set:

    -- Example: add the famous Pirate Island, Isla de Muerta
    countries =
            |> List.append [ { name = "Isla de Muerta", code = "XX", flag = "🏴‍☠️" } ]
    -- Example: rename a particular country
    renamedCountries =
                (\country ->
                    if == "Isla de Muerta" then
                        { country | name = "Island of the Dead" }

    This is also demonstrated in the example app.


    There's an example with a basic country picker in the example directory.

    cd example

    Note You must run elm-reactor from within the example directory to use the correct package dependencies.