Catalog ComboBoxes

<.country>

ConnieUI.ComboBoxes

HEEx
<div class="w-72">
  <ConnieUI.ComboBoxes.country field={@field} countries={@countries} />
</div>

Variant matrix

Every combination of one or two attributes, side by side.

Controls

When true, the country cannot be cleared. See `combo_box/1`.

See `combo_box/1`.

:string
:string

Shown while no country is picked. Defaults to "Select country…", translated.

Set by the example

field countries

Docs

Renders a searchable country combo box with flags. The countries' names are shown as given, so a caller rendering for a reader of another language passes them translated (see `ConnieUI.Forms.country_options/0`). ## Examples <ConnieUI.ComboBoxes.country field={@form[:country]} countries={Connie.Countries.countries()} />
Attribute Type Default Description
field * {:struct, Phoenix.HTML.FormField}
countries * :list
List of maps with `:code`, `:flag` and `:name`
required :boolean false
When true, the country cannot be cleared. See `combo_box/1`.
clearable :boolean true
See `combo_box/1`.
variant :string "standalone"
standalone | inline
placeholder :string nil
Shown while no country is picked. Defaults to "Select country…", translated.