lucamug / style-framework / Framework.FormFieldWithPattern

Demo

Fields with patterns

Input fields

inputText : Model -> { a | id : String, field : Field, label : String, pattern : String } -> Element Msg

Introspection

Used internally to generate the Style Guide

introspection : { name : String, description : String, signature : String, variations : List ( String, List ( Element msg1, String ) ) }

example1 : Model -> ( Element Msg, String )

example2 : Model -> ( Element Msg, String )

example3 : Model -> ( Element Msg, String )


type Field
    = FieldTelephone
    | FieldCreditCard
    | Field6DigitCode


type alias Model =
{ value : String
, focus : Maybe Field 
}


type Msg

initModel : Model

update : Msg -> Model -> ( Model, Platform.Cmd.Cmd Msg )