Select Input - Writer AI Studio

Overview

The Select Input component provides a dropdown interface for selecting single or multiple values from a searchable list of options. It offers a clean, accessible way to present multiple choices while maintaining a compact interface. Select inputs are essential for forms and interfaces where users need to choose from predefined options. They provide better user experience than text inputs for categorical data and help ensure data consistency and validation.

Common use cases

How it works

  1. Label: Provide a clear label for the select input field
  2. Options: Define available choices as key-value pairs in JSON format
  3. Dropdown: Display options in a searchable dropdown interface
  4. Selection: Allow users to select one or multiple options from the list
  5. Binding: Connect to a state variable to store the selected value
  6. Events: Trigger workflows when selections change

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

Configuration options

Basic settings

Binding settings

Styling options

Events

Example

User registration form

This example shows how to create a registration form with select inputs.

Interface:

Select Input configuration:

Multi-select tag management

Create a tag management interface for content categorization.

Interface:

Select Input configuration:

Best practices

  1. Clear labeling: Use descriptive labels that explain the selection purpose and context
  2. Logical ordering: Arrange options in logical order (alphabetical, numerical, or by frequency of use)
  3. Option clarity: Use clear, concise option text that users understand without ambiguity
  4. Accessibility: Ensure select inputs are keyboard navigable and screen reader friendly

Fields

Name Type Description Options
Label Text - -
Allow Multi-select Boolean Select more than one option from the dropdown. -
Options Key-Value Key-value object with options. Must be a JSON string or a state reference to a dictionary. -
Placeholder Text Text to show when no options are selected. -
Maximum count Number The maximum allowable number of selected options. Set to zero for unlimited. -
Accent Color - -
Primary text Color - -
Chip text Color The colour of the text in the chips. -
Container background Color - -
Separator Color - -
Custom CSS classes Text CSS classes, separated by spaces. You can define classes in custom stylesheets. -

Events

wf-option-change
Sent when the selected option changes.


def onchange_handler(state, payload):
    # Set the state variable "selected" to the selected option
    state["selected"] = payload

wf-options-change
Sent when the selected options change.


def onchange_handler(state, payload):
    # Set the state variable "selected" to the selected option
    state["selected"] = payload

This component provides a searchable dropdown for selecting one or multiple values. Usage: supply the Options field with a key-value object; open the dropdown and use the search box at the top to filter options by label (and detail, when provided). Configuration: Enable multi-selection via the ‘Allow Multi-select’ field; set a placeholder and limit selections with ‘Maximum count’ (applies only to multi-select). Limitations: search is client-side, case-insensitive, and matches label/detail text only (not the option key); no remote/async search; very large option lists are filtered in-memory.