mind-gym/elements/5.4.0

NOTE: the latest version is 5.4.2

MG.Input

Input fields

{ onChange : String -> msg
, onEnter : msg
, value : String
, errorStr : Maybe String
, onSubmit : Maybe msg
, isFocused : Bool
, viewport : Viewport
}
-> Element msg

Common email field with animated placeholder

{ value : ( Char, String )
, enableMsg : msg
, viewport : Viewport
, isFocused : Bool
}
-> Element msg

An element that looks like an input field, but is disabled and contains a button to change the value. For use when a user has already entered their email address. value is a (Char, String) to ensure that this element can not be created with an empty value.

newPassword : { note : Maybe String } -> PasswordFieldParams msg -> Element msg

New password field with animated placeholder with optional note below the input field.

currentPassword : PasswordFieldParams msg -> Element msg

Current password field with animated placeholder

{ onChange : String -> msg
, value : String
}
-> Element msg

A plain white e-mail field with no animations

Controls

primaryButton : ButtonParams msg -> Element msg

Common primary button

secondaryButton : ButtonParams msg -> Element msg

Common secondary button

radioButton : OptionState -> Element msg

A simple radio button

Misc.

type alias OptionParams ratingValue =
{ rating : ratingValue
, name : Maybe String
, description : Maybe String
}

Needed for use with ratingScale

{ viewport : Viewport
, options : List (OptionParams ratingValue)
, selected : Maybe (OptionParams ratingValue)
, onSelect : OptionParams ratingValue -> msg
}
-> Element msg

A rating scale - can handle any type as a value. Vertically displayed on smaller viewports, and horizontally displayed on larger viewports.