Skip to content

CardActionButton

Supports one specific action and/or multiple actions that directly impact the card. Specifically for Android, the OnPress and OverflowItems cannot co-exist, when both properties are defined, the OverflowItems would take precedence.


When assigning a rule to a property of CardActionButton, the rule will be passed an instance of the following proxy class as an argument:


CardActionButton Properties

Property Type Required Default
Image Image No
OnPress ActionOrRule No
OverflowItems OverflowItem No
Styles object No
Visible boolean No true
_Name string No
_Type const No

Image

Image to be replace default overflow image in the card header. Change to another image relevant to the action if card only requires one specific action instead of multiple actions.


OnPress

Action/Rule to be triggered when the action button is pressed. When both OnPress and OverflowItems are defined, it is recommended for the OnPress to not trigger UI related actions e.g. Message, ToastMessage, and PopoverMenu actions, as it could cause render issue for the OverflowItems popup. The ClientAPI object to be received in rule function is CardHeaderActionButtonProxy.


OverflowItems

Defines the ActionItems for the Card.


Styles

Style to be applied on the ActionButton.

  • type: object with following properties.
Property Type Required Default
Image string No

Image

The string value is a style class name for Image. Style would be applied to default overflow image if Image is not defined. Customisation of Image's size is not supported on the default overflow image.


Visible

  • type: boolean
  • default: true

_Name

  • type: string

_Type

  • type: const

The value of this property must be:

"CardHeader.Type.ActionButton"