Skip to main content

Text Input Component

The Text Input component allows participants to provide free-form text responses. It supports single-line inputs, multi-line text areas, and specialized input types like email and number.

Key Features

  • Single-line and multi-line input modes
  • Character count and limits
  • Input validation (email, number, minimum/maximum length)
  • Placeholder text
  • Required field enforcement
  • Customizable appearance

When to Use

Use the Text Input component when you need to:

  • Collect open-ended responses
  • Gather short answers or comments
  • Collect specific data types (email, numbers)
  • Allow participants to explain their choices
  • Capture qualitative feedback

Configuration

Basic Settings

SettingDescriptionDefault
PromptQuestion or instruction for participants(required)
PlaceholderHint text shown when input is empty""
Input TypeType of input: text, textarea, email, numbertext
RequiredWhether a response must be providedfalse
Output VariableVariable to store the response(required)

Text Validation

SettingDescriptionDefault
Min LengthMinimum character count required0
Max LengthMaximum character count allowednone
Show Character CountDisplay current/max charactersfalse

Number Input Options

SettingDescriptionDefault
MinMinimum allowed valuenone
MaxMaximum allowed valuenone
StepIncrement for number input1

Multi-line Options

SettingDescriptionDefault
RowsNumber of visible text rows4
ResizeAllow user to resize the textareavertical

Appearance

SettingDescriptionDefault
Background ColorInput field backgroundtheme default
Text ColorInput text colortheme default
Border ColorInput border colortheme default

Input Types

Single-Line Text

Standard text input for short responses.

Multi-Line Textarea

For longer responses that may span multiple lines.

With Character Limit

Shows character count and enforces maximum length.

Email Input

Validates email format before submission.

Number Input

Accepts only numeric values with optional min/max constraints.

Data Collection

The Text Input component stores:

  • Response Value: The text entered by the participant
  • Response Time: Time from display to submission
  • Timestamps: When displayed, first keystroke, and submitted

Example data structure:

{
"value": "This is my response to the question.",
"responseTime": 15234,
"timestamps": {
"displayed": 1621453287000,
"firstKeypress": 1621453290125,
"submitted": 1621453302234
}
}

Best Practices

  1. Clear Prompts: Write specific questions that guide participants
  2. Appropriate Length: Use textarea for longer responses, single-line for brief answers
  3. Reasonable Limits: Set min/max length based on expected response depth
  4. Helpful Placeholders: Provide example responses when helpful
  5. Validation Feedback: Let participants know when their input doesn't meet requirements