Button
<ui5-ai-button>
| Since 2.0.0The Button and ButtonState web components are availabe since 2.0 under an experimental flag and their API and behaviour are subject to change.
The ui5-ai-button
component serves as a button for AI-related scenarios. Users can trigger actions by clicking or tapping the ui5-ai-button
or by pressing keyboard keys like [Enter] or [Space].
Usage​
For the ui5-ai-button
user interface, you can define one or more button states by placing ui5-ai-button-state
components in their default slot.
Each state has a name for identification and can include text, an icon, and an end icon, as needed for its purpose.
You can define a split mode for the ui5-ai-button
, which will results in displaying an arrow button for additional actions.
You can choose from a set of predefined designs for ui5-ai-button
(as in ui5-button
) to match the desired styling.
The ui5-ai-button
can be activated by clicking or tapping it. You can change the button state in the click event handler. When the button is
in split mode, you can activate the default button action by clicking or tapping it, or by pressing keyboard keys like [Enter] or [Space].
You can activate the arrow button by clicking or tapping it, or by pressing keyboard keys like [Arrow Up], [Arrow Down], or [F4].
To display additional actions, you can attach a menu to the arrow button.
ES6 Module Import​
import "@ui5/webcomponents-ai/dist/Button.js";
Basic Sample​
Properties​
design​
disabled​
state​
activeArrowButton​
Slots​
default​
Events​
click​
arrow-click​
Methods​
No methods available for this component.
CSS Parts​
No CSS parts available for this component.