# textarea

Adds a **multi-line text input** to your indicator’s Inputs panel. Unlike `str()`, which is a single-line input, `textarea()` is designed for longer notes, JSON snippets, symbol lists, or any configuration that requires more space.

### Syntax

`input.textarea(title, value, id?, tooltip?, group?, inline?)`

### Parameters

* **title** `string` — Label shown in the Inputs panel.
* **value** `string` — Default text that appears in the textarea.
* **id** `string` (optional) — Unique key for referencing this input. If omitted, auto-generated from `title` (lowercased, spaces removed).
* **tooltip** `string` (optional) — Small helper text shown when hovering over the field.
* **group** `string` (optional) — Groups this input with others inside a collapsible section.
* **inline** `string` (optional) — Hint to align multiple inputs on the same row (not commonly used with textareas).

### Return Value

`{ id: string }` — The final `id` assigned to this textarea input.

### Example

```ts
// Example: Notes field
input.textarea(
  'Strategy Notes',
  'Enter your notes here...',
  undefined,
  'Add optional comments or explanations',
  'General Settings'
);

// Example: List of symbols
input.textarea(
  'Watchlist Symbols',
  'AAPL, MSFT, TSLA',
  undefined,
  'Comma-separated list of tickers',
  'Symbols'
);

// Later in your script:
// inputs[userNotes.id] → text written by user
// inputs[watchlistSymbols.id] → 'AAPL, MSFT, TSLA'
```

### Result

<figure><img src="/files/VVZDQuCY1CVW7Y6qlHja" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

### Tips

* &#x20;Great for letting users paste multiple values (e.g., tickers, levels, parameters).
* Combine with a tooltip to guide users on formatting (e.g., “Enter one symbol per line”).
  {% endhint %}

{% hint style="danger" %}

### Warning

Unlike dropdowns, textareas don’t enforce structure—users can enter anything. Be sure to validate or parse carefully.
{% endhint %}

{% hint style="success" %}

### Good Practice

* Use textareas for advanced or rarely changed settings, not for primary controls.
* Keep defaults meaningful, such as an example format, so users know how to enter data.
  {% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://custom-indicators.gitbook.io/custom-indicators-docs/script-inputs/textarea.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
