Context Button

<sw-context-button>

ready

Usage

Loading...
<sw-context-button>
    <sw-context-menu-item>
        Example item
    </sw-context-menu-item>
</sw-context-button>

Component properties

Property name Type Default
showMenuOnStartup Boolean false
menuWidth Number 220
menuOffsetTop Number 10
menuOffsetLeft Number 15
menuHorizontalAlign String right
menuVerticalAlign String bottom
icon String small-more
disabled Boolean false
autoClose Boolean true
additionalContextMenuClasses Object

Methods

Method name Parameters
mountedComponent No parameters
beforeDestroyComponent No parameters
openMenu No parameters
closeMenu event
addMenuToBody No parameters
removeMenuFromBody No parameters

Imports

  • ./sw-context-button.html.twig
  • ./sw-context-button.scss

SASS variables

Variable name Value
$sw-context-button-color-text $color-gutenberg ($color-darkgray-200)
$sw-context-button-border-radius $border-radius-default (4px)
$sw-context-button-color-border $color-steam-cloud ($color-gray-300)
$sw-context-button-color-disabled $color-light-gray ($color-gray-100)

Twig blocks

  • sw_context_button_button
  • sw_context_button_menu_slot_default
  • sw_context_button_menu
  • sw_context_button

Slots

  • button
  • default