overflow_menu: Overflow menu element

View source: R/elements.R

overflow_menuR Documentation

Overflow menu element

Description

This is like a cross between a button and a select menu when a user clicks on this overflow button, they will be presented with a list of options to choose from. Unlike the select menu, there is no typeahead field, and the button always appears with an ellipsis ("…") rather than customisable text.

Usage

overflow_menu(id, options, confirm = NULL)

Arguments

id

character, An identifier for the action triggered when a menu option is selected.

options

An list of block_option objects.

confirm

A confirm object that defines an optional confirmation dialog that appears after a menu item is selected.

Details

Works with block types: Section, Actions

Value

block menu class

See Also

Other elements: button_element(), checkbox_element(), datepicker_element(), image_element(), plaintext_element(), radiobuttons_element(), select_menu(), select_type_menu()

Examples

section_block(
 id = 'section 890',
 text = block_text('This is a section block with an overflow menu.'),
 accessory =  overflow_menu(
      id = 'overflow',
      options = as.blocks(
        lapply(sprintf('value-%d',1:4),block_option,
        text = '*this is plain_text text*')
       )
    )
)

yonicd/slackblocks documentation built on March 2, 2023, 6:53 a.m.