← Back to Components
Combobox
Searchable select with type-to-filter, keyboard navigation, and single or multiple modes.
Interactive Playground
R Code
API Reference
block_combobox()
A searchable select (shadcn Command + Popover): type-to-filter over choices with keyboard navigation, single and multiple modes, and the same hidden-native value bridge as block_select().
| Argument | Type | Default | Description |
|---|---|---|---|
| input_id | character | required | Shiny input binding identifier. |
| choices | list | character | required | List of selectable values/keys. |
| selected | character | character[] | NULL | Initial selected value; use a vector for multiple mode. |
| placeholder | character | NULL | Prompt text shown on the trigger when selection is empty. |
| search_placeholder | character | 'Search...' | Placeholder shown in the type-to-filter box. |
| empty_message | character | 'No results found.' | Message shown when the filter matches no choices. |
| disabled | logical | FALSE | Disable user inputs. |
| width | character | '100%' | Dimensions layout width. |
| style | character | NULL | Inline styling string. |
| size | 'default' | 'sm' | 'lg' | 'default' | Sizing dimensions. |
| invalid | logical | FALSE | Apply invalid visual highlights. |
| multiple | logical | FALSE | Allow selecting multiple values. |
| max_items | integer | NULL | Optional maximum selected values in multiple mode. |
| class | character | NULL | Additional styling classes. |
update_block_combobox()
Overwrites values, choices, filter/empty text, or input locks from R servers.
| Argument | Type | Default | Description |
|---|---|---|---|
| session | ShinySession | required | Active Shiny session object. |
| input_id | character | required | Target input ID. |
| choices | list | character | NULL | New selection choices list. |
| selected | character | character[] | NULL | Value selector key or vector to choose. |
| search_placeholder | character | NULL | Replacement filter-box placeholder. |
| empty_message | character | NULL | Replacement empty-state message. |
| disabled | logical | NULL | Toggle input disabled state. |
| invalid | logical | NULL | Update invalid border styling. |