Input Block
The input block renders a text input field. Requires channel mode: "interactive".
Fields
| Field | Type | Required | Values | Default |
|---|---|---|---|---|
type |
string | Yes | "input" |
— |
label |
string | No | Display label above the input | null |
placeholder |
string | No | Placeholder text | null |
input_type |
string | No | "text", "number", "email", "url" |
"text" |
default_value |
string | No | Pre-filled value | null |
disabled |
boolean | No | true, false |
false |
required |
boolean | No | true, false |
false |
clear_on_submit |
boolean | No | Reset value when any button in the card is pressed | true |
send_on_change |
boolean | No | Send an input_change webhook when value changes |
false |
Input Types
| Value | Description |
|---|---|
"text" |
Free text input |
"number" |
Numeric input |
"email" |
Email with format validation |
"url" |
URL with format validation |
Examples
Basic Text Input
{
"type": "input",
"label": "Your Name",
"placeholder": "Enter your name"
}
Email Input
{
"type": "input",
"label": "Email Address",
"input_type": "email",
"placeholder": "[email protected]",
"required": true
}
Number Input with Default
{
"id": "quantity",
"type": "input",
"label": "Quantity",
"input_type": "number",
"default_value": "1"
}
Read-only Display
{
"type": "input",
"label": "Order ID",
"default_value": "ORD-12345",
"disabled": true
}
Webhook Payload
Fired only when send_on_change: true. Triggered when the user blurs the input after changing its value.
{
"type": "input_change",
"card_id": "card-uuid",
"payload": {
"block_type": "input",
"value": "[email protected]"
}
}
Tip: The current input value is always included in the
card_stateof any button click, sosend_on_changeis only needed if you want to react to changes without waiting for a button press.
Patching
{
"id": "my-input",
"patch": {
"default_value": "Updated value",
"disabled": true
}
}