LaraUI - V1.0

Textarea

The <x-xf::textarea> component is a Blade wrapper for rendering multi-line text input fields. It supports labels, sizes, pre-filled values, and flexible customization through HTML attributes and classes — ideal for descriptions, comments, or any long-form input.

📄 <x-xf::textarea>

📘 Description

The <x-xf::textarea> component is designed for rendering multi-line text areas in Laravel Blade views. It supports dynamic binding of default values, field sizing, optional labels, and custom attributes — making it perfect for user comments, product descriptions, and more.

This component integrates seamlessly with Laravel’s old() input system and model data binding.

✅ Usage Example

<x-xf::textarea 
    name="description" 
    label="Product Description" 
    size="lg" 
    value="Default text content here..." 
    :attr="['rows' => 5, 'placeholder' => 'Write something...']" 
    class="mb-4"
/>

🔑 Props

Name Type Required Default Description
name string Name attribute of the textarea for form submission and model binding.
attr array [] Additional HTML attributes such as rows, placeholder, etc.
size string 'md' Defines the input size variant: sm, md, or lg.
label string|null null Optional label displayed above the textarea.
value string|null null Default content to display inside the textarea.
class string|null null Custom CSS classes to apply for styling.

🛡 Features

  • ✅ Multi-line text input with dynamic value support
  • ✅ Integrates with old() and model data
  • ✅ Supports custom attributes like rows, cols, placeholders
  • ✅ Responsive sizing and optional labels