Textarea

Basic Text Area

Textarea

Textarea - Invalid

Textarea - Valid

<!-- form.blade.php -->
<form class="c-form js-form-validation" autocomplete="on" id="673ed1e41c4fd" data-uid="673ed1e41c502" method="POST" action="#">

    
    
    <div class="grid">
        <div class="grid-md-12">
                <h2>Textarea</h2>
                <!-- field.blade.php -->
<div class="c-field c-field--text c-field--md c-field--radius-md" id="673ed1e41c2c7" data-uid="673ed1e41c2de">
    
            <label class="c-field__label " for="input_673ed1e41c2c7" id="label_673ed1e41c2c7">
            Send us a message!
                            <span class="u-color__text--danger" aria-hidden="true">*</span>
                    </label>
            
    <div class="c-field__inner c-field__inner--text">
        
        
        
            
            <textarea id="input_673ed1e41c2c7" aria-labelledby="label_673ed1e41c2c7" placeholder="Elit Quam Porta Parturient Adipiscing" type="text" name="message" required="required" data-js-required="" data-required="1" aria-required="true" autocomplete="off"></textarea>
            <div class="c-field_focus-styler u-level-top"></div> 
        
        
        
        
            <!-- icon.blade.php -->
    <span class="c-icon c-field__suffix c-field__error-icon c-icon--error-outline c-icon--material c-icon--material-error_outline material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-md" aria-hidden="false" material-symbol="error_outline" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" data-uid="673ed1e41c31c">
                    </span>

        
            <!-- icon.blade.php -->
    <span class="c-icon c-field__suffix c-field__success-icon c-icon--check-circle-outline c-icon--material c-icon--material-check_circle_outline material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-md" aria-hidden="false" material-symbol="check_circle_outline" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" data-uid="673ed1e41c356">
                    </span>

    </div>

    
    </div>
        </div>

        <div class="grid-md-12">
                <h2>Textarea - Invalid</h2>
                <!-- field.blade.php -->
<div class="c-field is-invalid c-field--text c-field--md c-field--radius-md" id="673ed1e41c3a0" data-uid="673ed1e41c3b1">
    
            <label class="c-field__label " for="input_673ed1e41c3a0" id="label_673ed1e41c3a0">
            Send us a message!
                            <span class="u-color__text--danger" aria-hidden="true">*</span>
                    </label>
            
    <div class="c-field__inner c-field__inner--text">
        
        
        
            
            <textarea id="input_673ed1e41c3a0" rows="15" style="resize: none;" aria-labelledby="label_673ed1e41c3a0" placeholder="Elit Quam Porta Parturient Adipiscing" type="text" name="message" required="required" data-js-required="" data-required="1" aria-required="true" autocomplete="off"></textarea>
            <div class="c-field_focus-styler u-level-top"></div> 
        
        
        
        
            <!-- icon.blade.php -->
    <span class="c-icon c-field__suffix c-field__error-icon c-icon--error-outline c-icon--material c-icon--material-error_outline material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-md" aria-hidden="false" material-symbol="error_outline" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" data-uid="673ed1e41c3e2">
                    </span>

        
            <!-- icon.blade.php -->
    <span class="c-icon c-field__suffix c-field__success-icon c-icon--check-circle-outline c-icon--material c-icon--material-check_circle_outline material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-md" aria-hidden="false" material-symbol="check_circle_outline" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" data-uid="673ed1e41c415">
                    </span>

    </div>

    
    </div>
        </div>

        <div class="grid-md-12">
                <h2>Textarea - Valid</h2>
                <!-- field.blade.php -->
<div class="c-field is-valid c-field--text c-field--md c-field--radius-md" id="673ed1e41c45a" data-uid="673ed1e41c46a">
    
            <label class="c-field__label " for="input_673ed1e41c45a" id="label_673ed1e41c45a">
            Send us a message!
                            <span class="u-color__text--danger" aria-hidden="true">*</span>
                    </label>
            
    <div class="c-field__inner c-field__inner--text">
        
        
        
            
            <textarea id="input_673ed1e41c45a" rows="15" style="resize: none;" aria-labelledby="label_673ed1e41c45a" placeholder="Elit Quam Porta Parturient Adipiscing" type="text" name="message" required="required" data-js-required="" data-required="1" aria-required="true" autocomplete="off"></textarea>
            <div class="c-field_focus-styler u-level-top"></div> 
        
        
        
        
            <!-- icon.blade.php -->
    <span class="c-icon c-field__suffix c-field__error-icon c-icon--error-outline c-icon--material c-icon--material-error_outline material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-md" aria-hidden="false" material-symbol="error_outline" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" data-uid="673ed1e41c4a2">
                    </span>

        
            <!-- icon.blade.php -->
    <span class="c-icon c-field__suffix c-field__success-icon c-icon--check-circle-outline c-icon--material c-icon--material-check_circle_outline material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined  c-icon--size-md" aria-hidden="false" material-symbol="check_circle_outline" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" alt="Icon: Undefined" data-uid="673ed1e41c4d3">
                    </span>

    </div>

    
    </div>
        </div>

        <div class="grid-md-12">
            <input type="submit">
        </div>
    </div>
</form>
@form([
    'attributeList' => [
        'autocomplete' => 'on'
    ]
])
    <div class="grid">
        <div class="grid-md-12">
            @markdown
                ##Textarea
            @endmarkdown

            @field([
                'type' => 'text',
                'placeholder' => 'Elit Quam Porta Parturient Adipiscing',
                'name' => 'message',
                'autocomplete' => 'off',
                'label' => "Send us a message!",
                'required' => true,
                'multiline' => true
            ])
            @endfield
        </div>

        <div class="grid-md-12">
            @markdown
                ##Textarea - Invalid
            @endmarkdown

            @field([
                'type' => 'text',
                'placeholder' => 'Elit Quam Porta Parturient Adipiscing',
                'name' => 'message',
                'autocomplete' => 'off',
                'label' => "Send us a message!",
                'required' => true,
                'multiline' => 15,
                'classList' => [
                    'is-invalid'
                ]
            ])
            @endfield
        </div>

        <div class="grid-md-12">
            @markdown
                ##Textarea - Valid
            @endmarkdown

            @field([
                'type' => 'text',
                'placeholder' => 'Elit Quam Porta Parturient Adipiscing',
                'name' => 'message',
                'autocomplete' => 'off',
                'label' => "Send us a message!",
                'required' => true,
                'multiline' => 15,
                'classList' => [
                    'is-valid'
                ]
            ])
            @endfield
        </div>

        <div class="grid-md-12">
            <input type="submit">
        </div>
    </div>
@endform

Blade component parameters

Key Default value Type Available values Description
label string - Array of label items like labelText.
required false boolean - HTML5 validation on fields
value string - Field value
id string - The DOM id of the component.
classList [] array - Array containing wrapping classes array
attributeList [] array - Array containing keys and values rendered as attributes
containerAware false boolean true/false Makes the component container aware. Appends modifiers --size--xs/sm/md/lg to the component.
Settings location: /var/www/webroot/ROOT/vendor/helsingborg-stad/component-library/source/php/Component/Textarea/textarea.json