alexanderkiel / elm-mdc-alpha / Material.TextField

Text fields let users enter and edit text.

Install

In your application install:

npm install "

Model


type alias Model context problem value =
{ focused : Basics.Bool
, parser : Parser.Advanced.Parser context problem value
, value : Maybe value
, parseError : List (Parser.Advanced.DeadEnd context problem)
, input : Maybe String 
}

The full model requires the type params context and problem as defined in Parser.Advanced. Use SimpleModel if you plan to use a normal parser.


type alias SimpleModel value =
Model Basics.Never Parser.Problem value

The simple model should be used if a normal parser is sufficient.

init : Parser.Advanced.Parser context problem value -> (value -> String) -> Maybe value -> Model context problem value

Update


type Msg

update : Msg -> Model context problem value -> Model context problem value

View

view : RequiredConfig msg value -> Model context problem value -> List (Property msg value) -> List (Html msg) -> Html msg

Properties

fullWidth : Property msg value

outlined : Property msg value

label : String -> Property msg value

leadingIcon : String -> Property msg value

trailingIcon : String -> Property msg value

Reference