Extras
PhoneInput
Bit.BlazorUI.Extras
BitPhoneInput pairs a searchable country selector - flag, name and dialing code - with a tel input. Value always holds the full number in E.164 form (+[code][number]), while the local digits and the country stay bindable on their own through Number and Country. A typed or pasted international prefix picks its country, the digits can be laid out over a per-country pattern, and the whole field is keyboard and screen-reader operable.
Countries
Replacing and trimming the country list, preferred countries, the search box, and what the country selector shows or whether it can change.
Custom countries
Countries replaces the built-in list (
BitCountries.All) and ExcludeCountries
trims it. Both also limit the dialing-code lookup, so a pasted number with a code outside the list is kept
whole rather than attached to the wrong country.
Countries (five markets):
ExcludeCountries (every country but these three):
Preferred countries
PreferredCountries pins countries to the top of the list, set apart by a rule. They also settle a dialing code shared by
several countries (+1, +7); otherwise
BitCountry.Priority does, and the current selection
always wins over both.
Search box
The search matches names (accents folded, word starts), ISO codes and dialing codes (
+44,
0044 and 44 alike), and the result count is announced to screen readers.
SearchBoxPlaceholder, SearchBoxAriaLabel and NoResultsText set its texts.
NoSearchBox removes it; the selector then answers to type-ahead, open or closed
(united s reaches the United States). The same letter typed again cycles through the countries
starting with it, and what is typed is matched by the rules of the current culture, which ignore case and
the accents that culture treats as marks on a letter.
Dropdown display
NoFlags and NoDialCode trim the selector, DropdownPlaceholder fills it while no
country is selected, and FlagUrlSelector serves the flags from your own source (returning null
keeps the built-in one). NoDropdown fixes the country: it is shown and read to screen readers, but
can only be set through the parameters - a pasted
+44 number does not move it.
NoFlags:
NoDialCode:
DropdownPlaceholder:
FlagUrlSelector:
NoDropdown:
Country: Japan, +81
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.
