The priority of buttons within a page should be considered. For instance, only use the main button once within a page or modal.
Color is also important. For instance, the most important button has a blue background where as a red button should only be used if the action it performs is potentially destructive.
Button Options
There are three emphasis styles used to indicate the importance of the button on the page.
Emphasized Button: There should only be one highlighted button on the page. This is the primary call to action.
Regular Button: The default button style and the most common button. There may be more than one on a page.
Light Button: This is the lowest priority button and most often used with page content like appearing in a table or list. There may be more than one on the page.
Button Types
There are five button types that can be combined with the emphasis styles.
Action Button: The default button
Standard Button: Neutral or informative color
Positive Button: Used for positive actions such as approved, ok, yes.
Medium Button: Used for warnings or alert
Negative Button:Used for negative actions such as decline, cancel, no.
Button Sizes
There are two sizes.
The compact size is only used on desktop and it is full size when used on a touch device.
Buttons with Icon
All buttons styles can be used with an icon. You can use the sap-icon--{icon-name} class to attach an icon to the button.
Full list of all the available icons can be found on the icons page.
Standard button state
The buttons can also be set to a state:
Normal: The default state of the button. It can be clicked/tapped to perform the corresponding action.
Selected: Used to signal this button is selected among other buttons. This state can be rendered using is-selected class or aria-selected="true" attribute for accessibility.
Disabled: It cannot be clicked/tapped. This state can be rendered using is-disabled class or aria-disabled="true" attribute for accessibility.
Button Group
Available since 1.0.0
Last updated 1.3.0
Group a series of buttons together on a single line with the button group.