Skip to content

Textarea

Components that are responsible for rendering a html textarea control. The root components is <h-textarea>, it wraps whole form control, for a html control we have a h-textarea-control element.

The root element has a textarea class.

Note: h- stands for headless. This is naming convention used for every webcomponent as they must have a two-part name.

Example

<h-textarea 
    controlId="description" 
    controlName="description">
        <h-textarea-control></h-textarea-control>
</h-textarea>
<h-textarea 
    controlid="description" 
    controlname="description" 
    class="textarea">
        <h-textarea-control class="textarea__control">
            <textarea 
                id="description" 
                name="description"></textarea>
        </h-textarea-control>
</h-textarea>

Inner h-textarea components

We provide a one sub component for textarea, the h-textarea-control.

h-textarea-control

The h-textarea-control renders a html textarea control. It can be used standalone, separate from h-textarea It accepts multiple attributes, that can be passed to control directly (if used standalone), or we can set them to h-textarea. The root element has a textarea__control class.

Attributes

Attribute name Type Default Description
controlId string ''
controlName string ''
disabled boolean false
required boolean false
hidden boolean false
readonly boolean false
checked boolean false
value string ''
placeholder string ''