---
title: "Textarea"
description: "Add Textarea control to your custom blocks for WordPress using the Lazy Blocks plugin."
url: "https://www.lazyblocks.com/docs/blocks-controls/textarea/"
lastUpdated: 2026-09-09
source: "blocks-controls/textarea.mdx"
---
# Textarea

Textarea control provides a multi-line text input field, perfect for longer content like descriptions, excerpts, or any text that needs multiple paragraphs.

## Control Settings

- **Placeholder** (`placeholder`) - text shown when the field is empty. Empty by default
- **Characters Limit** (`characters_limit`) - the `maxlength` put on the textarea, from 0 to 524288. Empty by default, which is no limit

## Usage Examples

### Basic Output

```php title="PHP" /$attributes['control_name']/
<div class="description">
    <?php echo wp_kses_post( nl2br( $attributes['control_name'] ) ); ?>
</div>
```

```hbs title="Handlebars" /{{control_name}}/
<div class="description">
  {{control_name}}
</div>
```

### Post Meta

```php title="Post Meta" /get_lzb_meta( 'control_meta_name' )/
<?php
$text = get_lzb_meta( 'control_meta_name' );
if ( $text ) {
    echo '<div class="description">';
    echo wp_kses_post( nl2br( $text ) );
    echo '</div>';
}
?>
```

Use `nl2br()` to convert line breaks to `<br>` tags, or `wpautop()` to convert them to paragraphs.

## Documentation Index
> Fetch the complete documentation index at: https://www.lazyblocks.com/llms.txt
> Fetch every page in a single file at: https://www.lazyblocks.com/llms-full.txt
