← 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().

ArgumentTypeDefaultDescription
input_idcharacterrequiredShiny input binding identifier.
choiceslist | characterrequiredList of selectable values/keys.
selectedcharacter | character[]NULLInitial selected value; use a vector for multiple mode.
placeholdercharacterNULLPrompt text shown on the trigger when selection is empty.
search_placeholdercharacter'Search...'Placeholder shown in the type-to-filter box.
empty_messagecharacter'No results found.'Message shown when the filter matches no choices.
disabledlogicalFALSEDisable user inputs.
widthcharacter'100%'Dimensions layout width.
stylecharacterNULLInline styling string.
size'default' | 'sm' | 'lg''default'Sizing dimensions.
invalidlogicalFALSEApply invalid visual highlights.
multiplelogicalFALSEAllow selecting multiple values.
max_itemsintegerNULLOptional maximum selected values in multiple mode.
classcharacterNULLAdditional styling classes.

update_block_combobox()

Overwrites values, choices, filter/empty text, or input locks from R servers.

ArgumentTypeDefaultDescription
sessionShinySessionrequiredActive Shiny session object.
input_idcharacterrequiredTarget input ID.
choiceslist | characterNULLNew selection choices list.
selectedcharacter | character[]NULLValue selector key or vector to choose.
search_placeholdercharacterNULLReplacement filter-box placeholder.
empty_messagecharacterNULLReplacement empty-state message.
disabledlogicalNULLToggle input disabled state.
invalidlogicalNULLUpdate invalid border styling.