You are reading docs for v1.3.1, click here for the latest version.
ActionItem

This is an overview of the most common usage of ActionItem. For more information about the available properties, methods, or events, head over to the complete API documentation for ActionItem.

The ActionItem component is used to add additional action buttons to the ActionBar.


<ActionBar title="My App">
  <ActionItem @tap="onTapShare"
    ios.systemIcon="9" ios.position="left"
    android.systemIcon="ic_menu_share" android.position="actionBar" />
  <ActionItem @tap="onTapDelete"
    ios.systemIcon="16" ios.position="right"
    text="delete" android.position="popup" />
</ActionBar>

Conditionally showing action items

ActionItems can be displayed based on a condition using the v-show directive.

<ActionBar title="My App">
  <ActionItem @tap="onTapEdit"
    v-show="!isEditing"
    ios.systemIcon="2" ios.position="right"
    android.systemIcon="ic_menu_edit" />
  <ActionItem @tap="onTapSave"
    v-show="isEditing"
    ios.systemIcon="3" ios.position="right"
    android.systemIcon="ic_menu_save" />
  <ActionItem @tap="onTapCancel"
    v-show="isEditing"
    ios.systemIcon="1"
    android.systemIcon="ic_menu_close_clear_cancel" />
</ActionBar>

Props

nametypedescription
ios.systemIconStringSets the icon for iOS.
android.systemIconStringSets the icon for Android.
ios.positionStringSets the position for iOS.
Possible values:
- left (default): Puts the item on the left side of the ActionBar.
- right: Puts the item on the right side of the ActionBar.
android.positionStringSets the position for Android.
Possible values:
- actionBar (default): Puts the item in the ActionBar.
- popup: Puts the item in the options menu. Items will be rendered as text.
- actionBarIfRoom: Puts the item in the ActionBar if there is room for it. Otherwise, puts it in the options menu.

Events

namedescription
tapEmitted when the ActionItem has been tapped.
Contributors