Button¶
A button communicates the action that it is going to initiate. Users can click a button to begin a process or workflow, or to trigger an action.
Button Properties¶
| Property | Type | Required | Default |
|---|---|---|---|
| ButtonType | enum |
Optional | "Text" |
| Enabled | boolean |
Optional | true |
| Image | Image | Optional | |
| ImagePosition | enum |
Optional | "Leading" |
| OnPress | ActionOrRule | Optional | |
| Position | enum |
Optional | "Left" |
| Semantic | enum |
Optional | "Tint" |
| Styles | object |
Optional | |
| Title | string |
Optional | |
| Visible | boolean |
Optional | true |
| _Name | string |
Required | |
| _Type | const |
Required |
ButtonType¶
Important types of the button.
- type:
enum - default:
Text
The value of this property must be equal to one of the known values below.
| Value | Description |
|---|---|
Primary |
Emphasize the most important actions. |
Secondary |
Less emphasis, but still require user's attention. |
Text |
Less important actions users can take. |
Enabled¶
Sets the button as enabled or disabled.
- type:
boolean - default:
true
Image¶
The image to be displayed with the title.
- type: Image
ImagePosition¶
Position of the image to be displayed along with the title
- type:
enum - default:
"Leading"
The value of this property must be equal to one of the known values below.
ImagePosition Known Values¶
| Value | Description |
|---|---|
Leading |
|
Trailing |
OnPress¶
Action/Rule to be executed when the button is pressed. The ClientAPI object to be received in rule function is SectionProxy.
- type: ActionOrRule
- Formatter and Binding are not supported
Position¶
Display position of the label in the section header.
- type:
enum - default:
"Left"
The value of this property must be equal to one of the known values below.
Position Known Values¶
| Value | Description |
|---|---|
Left |
|
Right |
Semantic¶
Use the semantic buttons for positive and negative actions.
- type:
enum - default:
Tint
The value of this property must be equal to one of the known values below.
| Value | Description |
|---|---|
Normal |
Use it for neutral actions, e.g. Back / Cancel. |
Tint |
Use it for positive actions, e.g. Update / Add / Approve. |
Negative |
Use it for negative actions, e.g. Delete / Reset / Reject. |
Styles¶
Set styles for button.
- type:
objectwith following properties.
| Property | Type | Required | Default |
|---|---|---|---|
| Image | string |
Optional | |
| Button | string |
Optional |
Image¶
The string value is a style class name for Image. It is applicable only to SAP icon or font icon types (Supported CSS properties are font-size and color).
- Image style class
Button¶
The string value is a style class name for Button.
- ButtonNew style class
Title¶
- type:
string
Visible¶
Sets the visibility of the control.
- type:
boolean - default:
true
_Name¶
- type:
string
_Type¶
- type:
const
The value of this property must be equal to:
"SectionHeaderItem.Type.Button"