Text Input - Writer AI Studio

Overview

The Text Input component allows users to enter single-line text values. It’s the most basic form of user input and is essential for collecting information from users in your agent. Text inputs automatically bind to state variables, making it easy to capture and use user input in your blueprint workflows. They support various styling options and can be configured for different use cases, including password fields.

Common use cases

How it works

  1. Label: Provide a clear label for the input field
  2. Placeholder: Add helpful placeholder text to guide users
  3. Binding: Connect to a state variable to store the input value
  4. Events: Trigger workflows when users type or finish editing
  5. Styling: Customize appearance with colors and CSS classes, and add a password mode for sensitive information

The component automatically updates the bound state variable as users type, and can trigger events for real-time processing or validation.

Configuration options

Basic settings

Styling options

Events

Example

Search interface

This example shows how to create a search interface with a text input. The search query is stored in the search_query state variable. For the blueprint workflow, you can access the search_query state variable to see the user’s query. Interface:

Search text input configuration:

Best practices

  1. Clear labels: Use descriptive labels that clearly indicate what information is needed
  2. Helpful placeholders: Provide examples or guidance in placeholder text
  3. Appropriate validation: Validate input on both client and server side
  4. Real-time feedback: Use the wf-change event for immediate user feedback
  5. Password security: Use password mode for sensitive information

Fields

Name Type Description Options
Label Text - -
Placeholder Text - -
Password mode Boolean - -
Accent Color - -
Custom CSS classes Text CSS classes, separated by spaces. You can define classes in custom stylesheets. -