Skip to contents

The split_button() enables users to trigger actions. It is constructed of two separate actions - default action and arrow action that can be activated by clicking or tapping, or by pressing certain keyboard keys - Space or Enter for default action, and Arrow Down or Arrow Up for arrow action.

See the official documention for split button, for all the correct props.

Examples

split_button(
  "menuId", 
  "Split Button",
  design = "Emphasized"
)
Split Button
htmltools::tagList(
  split_button("menu", "Menu"),
  menu(
    id = "menu",
    menu_item(text = "item1", value = "metxt1"),
    menu_item(text = "item2", value = "metxt2"),
    menu_item(text = "item3", value = "metxt3")
  )
)
Menu