mbr/elm-chadcn/1.0.0

ChadCn.Textarea

Provides a textarea component.

The implementation follows the shadcn Base UI structure and Nova defaults.

type Config msg

Describes a textarea and its behavior.

new : Config msg

Creates an uncontrolled textarea.

withAriaLabel : String -> Config msg -> Config msg

Sets the textarea's accessible label.

withAttributes : List (Attribute msg) -> Config msg -> Config msg

Adds native attributes to the textarea.

withDisabled : Bool -> Config msg -> Config msg

Sets whether the textarea is disabled.

withInvalid : Bool -> Config msg -> Config msg

Sets whether the textarea is invalid.

withOnInput : (String -> msg) -> Config msg -> Config msg

Sets the message created when the textarea value changes.

withPlaceholder : String -> Config msg -> Config msg

Sets the textarea placeholder.

withValue : String -> Config msg -> Config msg

Sets the controlled textarea value.

view : Config msg -> Html msg

Renders a configured textarea.