select_menu | R Documentation |
A select menu, just as with a standard HTML select tag, creates a drop down menu with a list of options for a user to choose. The select menu also includes type-ahead functionality, where a user can type a part or all of an option string to filter the list.
select_menu( id, placeholder, options, option_groups = NULL, initial_option = NULL, confirm = NULL, max_select_items = NULL )
id |
character, an identifier for the action triggered when a menu option is selected. |
placeholder |
character, defines the placeholder text shown on the menu. |
options |
list, a list of option objects. |
option_groups |
a list of option group objects. Default: NULL |
initial_option |
a single option that exactly matches one of the options within options or option_groups, Default: NULL |
confirm |
A confirm object that defines an optional confirmation dialog that appears after a menu item is selected. Default: NULL |
max_select_items |
integer, Specifies the maximum number of items that can be selected in the menu, Default: NULL |
Works with block types: Section, Actions, Input
If options
is specified, then option_groups
should not be and vice versa.
block menu class
Other elements:
button_element()
,
checkbox_element()
,
datepicker_element()
,
image_element()
,
overflow_menu()
,
plaintext_element()
,
radiobuttons_element()
,
select_type_menu()
section_block( id = 'section678', text = 'Pick an item from the dropdown list', accessory = select_menu( id = 'text1234', placeholder = 'Select an item', options = as.blocks( lapply(sprintf('value-%d',1:4),block_option, text = '*this is plain_text text*') ) ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.