ensolabs/designsystemet-elm/1.0.0

Designsystemet.Textarea

A native <textarea> with Designsystemet styling.

Mirrors Textarea from @digdir/designsystemet-react.

Textarea.view [ Attr.value model.comment, Events.onInput ChangedComment ]

Like Input, it needs a label. Put it in a Field or use Textfield.multiline.

Inside a Field and without rows, the textarea grows with its text.

React → Elm

  • <Textarea /> → Textarea.view []
  • rows={4} → Textarea.view [ Attr.rows 4 ]
  • <Textarea>Tekst</Textarea> → Textarea.view [ Attr.value "Tekst" ]
view : List (Attribute msg) -> Html msg

A <textarea class="ds-input">. Set its text with Attr.value.