alexanderkiel / elm-mdc-alpha / Material.Select

MDC Select provides Material Design single-option select menus.

Install

In your application install:

npm install "

Model


type alias Model =
{ focused : Basics.Bool
, value : Maybe String 
}

For each select, place a model value in your model.

init : Maybe String -> Model

Initializes the select menu with the following value.

Update


type Msg

Internal message type. Create a message which transports messages of that type.

update : Msg -> Model -> Model

Internal update function. Has to be called by your module on messages from every select menu you use.

View

view : (Msg -> msg) -> Model -> List (Property msg) -> List (Html msg) -> Html msg

Renders a select menu.

Takes a message lifter and the model.

Properties

label : String -> Property msg

Sets the label text. The selects label will be empty without setting this.

Reference