Phone number input with built in international dial code selector.
Render the Intl Phone Input element as part of your view function with some custom attributes to the phone number field.
type alias model =
{ phoneNumberstate : IntlPhoneInput.State
, phoneNumber : IntlPhoneInput.Type.PhoneNumber
}
type Msg
= PhoneNumberChanged IntlPhoneInput.State PhoneNumber (Cmd Msg)
view : Model -> Html Msg
view model =
IntlPhoneInput.input
[ Html.Attributes.class "MyPhoneInput" ]
(IntlPhoneInput.Config.defaultConfig PhoneNumberChanged)
model.phoneNumberstate
model.phoneNumberElm CSS version of input function. Use this if you use Elm CSS on your project to avoid the style tag being rendered to early.
Elm CSS version of input function. Use this if you use Elm CSS on your project to avoid the style tag being rendered to early.
Internal state of the Intl Phone Input element.
The initial state of the Intl Phone Input element
Render the Intl Phone Input element as part of your
viewfunction.