← Back to Components
Input
Premium single-line text input fields supporting diverse types.
Interactive Playground
R Code
API Reference
block_input()
Builds a standard single-line interactive form input element.
| Argument | Type | Default | Description |
|---|---|---|---|
| input_id | character | required | Input identifier. |
| type | 'text' | 'password' | 'email' | 'url' | 'tel' | 'search' | 'number' | 'text' | HTML text field variant category type. The number type renders stepper buttons and reports a numeric value (NA while empty). |
| placeholder | character | NULL | Preview text before typing. |
| min | numeric | NULL | Lower bound for the stepper and arrow keys (number type only). |
| max | numeric | NULL | Upper bound for the stepper and arrow keys (number type only). |
| step | numeric | NULL | Positive step size (number type only; browser default 1). |
| disabled | logical | FALSE | Disable user inputs. |
| invalid | logical | FALSE | Highlight validation error borders. |
| style | character | NULL | Custom layout wrapper styling. |
| class | character | NULL | Additional styles to merge. |
update_block_input()
Refreshes user text, hint messages, or active lock states dynamically.
| Argument | Type | Default | Description |
|---|---|---|---|
| session | ShinySession | required | Active Shiny session object. |
| input_id | character | required | Target input control ID. |
| value | character | NULL | Update text input value. |
| placeholder | character | NULL | Set new placeholder copy. |
| min | numeric | NULL | Replace the lower bound (number type only); NULL clears it. |
| max | numeric | NULL | Replace the upper bound (number type only); NULL clears it. |
| step | numeric | NULL | Replace the step size (number type only); NULL resets to 1. |
| disabled | logical | NULL | Freeze/unfreeze input. |
| invalid | logical | NULL | Toggle validation visual highlights. |