rundis/elm-bootstrap/3.0.0

NOTE: this package is not compatible with Elm 0.19.1

Bootstrap.Form.Textarea

This module allows you to create textarea elements.

Creating

textarea : List (Option msg) -> Html msg

Create a textarea element.

Textarea.textarea
    [ Textarea.id "myarea"
    , Textarea.rows 4
    , Textarea.onInput MyTextareaMsg
    ]

Options

id : String -> Option msg

Options/shorthand for setting the id of a textarea

rows : Int -> Option msg

Option/shorthand to set the rows attribute of a textarea

value : String -> Option msg

Shorthand for setting the value attribute of a textarea

defaultValue : String -> Option msg

Shorthand for setting the defaultValue attribute of a textarea

disabled : Option msg

Shorthand for setting the disabled attribute of a textarea

onInput : (String -> msg) -> Option msg

Shorthand for assigning an onInput handler for a textarea

attrs : List (Attribute msg) -> Option msg

Use this function to handle any Html.Attribute option you wish for your textarea

type Option msg

Opaque type representing legal textarea configuration options

Validation

These options really only makes sense when you used in conjuction with the form module. To use standalone, remember to wrap your textarea in a containing element and provide it one of the following classes:

  • has-success
  • has-warning
  • has-danger
success : Option msg

Option to add a success marker icon for your textarea.

Note: Please read the caveat described about validation options

warning : Option msg

Option to add a warning marker icon for your textarea.

Note: Please read the caveat described about validation options

danger : Option msg

Option to add a danger marker icon for your textarea.

Note: Please read the caveat described about validation options