Select
Prompt operator with single selection from dropdown list.
You can create a select with select:
ui:
components:
- key: voltage
type: select
label: "Power Supply Voltage"
description: "Select the test voltage"
required: true
options:
- label: "3.3V"
value: "3.3"
- label: "5.0V"
value: "5.0"Properties
Display
You can configure how the select appears to the operator.
| Property | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Unique identifier for accessing the value |
type | string | Yes | Must be "select" |
label | string | No | Display label for the select |
description | string | No | Helper text displayed below the select |
Value
You can set default values and bind to measurements or unit properties.
| Property | Type | Required | Description |
|---|---|---|---|
default_value | string | No | Default selected option value |
bind | string | No | Bind to unit property or measurement. See Collect Input for details. |
Options
You can define the list of choices available in the select.
| Property | Type | Required | Description |
|---|---|---|---|
options | array | Yes | Array of objects with label and value properties |
Each option object has:
| Property | Type | Description |
|---|---|---|
label | string | Text displayed to the operator |
value | string | Value submitted when selected |
Validation
You can validate selection before the value is submitted.
| Property | Type | Required | Description |
|---|---|---|---|
required | boolean | No | If true, operator must select an option (shows "Required" badge) |
TofuPilot validates operator input before submission, preventing continuation until all constraints are met. For some workflows, this input validation can create workarounds where operators bypass the UI to proceed.
Instead, you can capture the input as a Measurement using Binding and validate it with Validators. TofuPilot will record the actual operator input while enforcing pass/fail criteria.
Examples
Product Variant Selection
We'll let the operator select from multiple product variants:
phases:
- name: Select Variant
ui:
components:
- key: product_variant
type: select
label: "Product Variant"
required: true
options:
- label: "Standard - 8GB RAM"
value: "std_8gb"
- label: "Standard - 16GB RAM"
value: "std_16gb"
- label: "Pro - 16GB RAM"
value: "pro_16gb"
- label: "Pro - 32GB RAM"
value: "pro_32gb"
- label: "Enterprise - 64GB RAM"
value: "ent_64gb"Operator Selection
We'll track which operator is performing the test:
phases:
- name: Operator Login
ui:
components:
- key: operator_name
type: select
label: "Operator"
description: "Select your name"
required: true
options:
- label: "Alice Johnson"
value: "alice"
- label: "Bob Smith"
value: "bob"
- label: "Carol Davis"
value: "carol"
- label: "David Lee"
value: "david"How is this guide?