> For the complete documentation index, see [llms.txt](https://docs.agenticflow.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agenticflow.ai/workflows/workflow-inputs/text-input.md).

# Text Input

A **Text Input** is a fundamental input control that allows a user to enter a single line of text when they run a workflow. It is suitable for short pieces of text like a name, a search query, or a topic for content generation.

## How to Add

1. From your workflow's **Build** page, click on **+ Add Input** in the main canvas or the sidebar.
2. Select **Text Input** from the list of available controls.

## Configuration

When you add a Text Input control, you can configure the following settings:

* **Title:** The main label for the input field that the user will see.
* **Description:** Optional helper text that appears below the title to provide more context.
* **Variable Name:** The name used to access this input's value within the workflow. You can rename this by clicking on the green variable name at the bottom left of the control.
* **Optional/Required:** A toggle to specify whether the user must fill in this field before running the workflow.

## Setting a Default Value

You can pre-fill the Text Input with a default value:

1. Enter the desired default text into the input field.
2. Click the settings icon (⚙️) at the bottom right of the control.
3. Select **Set Current Value as Default**.

## Accessing the Value

To use the text provided by the user, you reference its variable name within double curly braces `{{}}`. For example, if the variable name is `topic`:

* **In most nodes:** You can directly use `{{topic}}` in a prompt or parameter field.
* **In a Code Node (Python):** You would access it as a variable, e.g., `topic = "{{topic}}"`
* **In a JavaScript step:** You would access it via `params.topic`.

### Example

If you create a **Text Input** with the variable name `product_name`, you could use it in a downstream OpenAI node like this:

```
Write a 50-word marketing description for the following product: {{product_name}}
```
