Intro

Buttons enable users to trigger actions in applications, from submitting data to opening menus or toggling views. They are available in different types and visual styles to reflect purpose, priority, and intent. Button behavior and appearance can change depending on user interaction, layout context, or the type of task.

Button component

There are 4 button types:

When to Use

2
do
false

Use the button types as follows:

  • Use simple buttons for specific actions, such as Create/Edit/Save, Approve/Reject, Accept/Decline, OK/Cancel.
  • Use toggle buttons in a toolbar to activate or deactivate an object or element. You can also use toggle buttons to switch between different states.
  • If you want the user to select one option from a small group, offer a segmented button in the toolbar. For example: Year/Month/Day, or Small/Medium/Large.
  • Use the menu button if you need a menu that provides more than one option.
dont
false

Do not use buttons if:

  • You want to link to a different page or object. Use the link instead.
  • You want to display general navigation functions. Use Home or breadcrumbs, ensuring navigation is clearly distinguished by positioning items on the left side.
  • You want to provide the ability to navigate within a multi-step process. Use a wizard instead.
  • You want to let users upload content. Use the upload set control instead.
  • You want to let users select from multiple related options. Use radio buttons or checkboxes.

Anatomy

  1. Text: Describes the action triggered by the button.
  2. Icon: Shows a symbol to help clarify what the button does.
  3. Stroke: Outlines the button with a border to define its shape, especially in low-contrast environments.
  4. Background: Indicates the button’s semantic meaning using different background colors (for example, neutral or warning).

Anatomy of the button control

Types

Button

Buttons can trigger different types of actions, with appropriate styling to help users recognize the intent and importance of each one. These different action types are explained in more detail in the action placement guideline.

Button Variants

A. Text Only

B. Icon Only

C. Icon and Text

Button variants

guideline

Within SAP S/4HANA, a button can contain either an icon or a text.

The SAP Fiori Elements framework supports only text buttons, except for in tables, where inline action buttons can be either icon or text, not both.

Button Priority and Emphasis

A. Primary Action: Emphasized with filled color appearance; used for primary or most frequent action.

B. Secondary Action: Light or minimally styled appearance; used for supporting actions.

C. Tertiary Action: Minimally styled button, often with color-only text and no border; used for low-priority actions.

Button types by priority

Button Intent and Styling

A. Success Action: Positive styling (green); used to confirm successful or desirable outcomes.

B. Negative Action: Error styling (red); used for actions that delete, remove, or cancel, such as delete account or cancel subscription.

C. Attention Action: Caution styling (yellow); used for actions that might lead to unintended consequences, such as continue without saving or send anyway.

Button styles by intent

guideline

Always use a text button for primary, secondary, semantic, and negative path actions.

[external_only]Use icon buttons only if the icon metaphor is easily recognizable. Ideally, it should have same meaning worldwide.[/external_only] [internal_only]Use icon buttons only for very basic standard icon metaphors described in the product standard for UX consistency (UXC-019 – Iconography, section: “Specification Icon Metaphor Alignment”).[/internal_only] For more information about icons in general, check out the article on iconography.

Use the following button styling for the different action types in the header and footer toolbar:

[internal_only]Do not use any other styling types.[/internal_only]

Content Toolbars

Use the following button styles in content toolbars for tables, forms, or charts:

Toggle Button

A toggle button switches between two actions. One of the actions is always active, one is inactive. Use the toggle button for secondary actions.

Apply the following button styles for the different toolbars:

Do not use any other styling types and ensure the button label communicates the toggleable nature of the button.

Toggle button - regular and pressed state

Segmented Button

A segmented button shows a group of options. Only one of the options can be active, the others remain or become inactive. Pressing an option activates it. By default, the control for segmented buttons calculates the button width and applies it to all buttons within the group. You can change this by setting the width for individual buttons.

The segmented button is comparable to a radio button group control.

Segmented button - regular and pressed state

There are two types of menu buttons. Both can contain items and submenus.

Standard Menu Button

When the user activates the button, the menu opens. This is the default type.

Standard menu button

Split Menu Button

The split menu button is separated into two areas: the text and the arrow icon. The separator between them signals that the two areas result in different actions. The user has two choices: activating the text on the button triggers the action. Activating the arrow opens the menu. The split button consolidates a variety of commands, especially when one of the commands is used more often.

In split mode, the text depends on the default action. If the default action is displayed as an icon only, all the menu items must contain icons.

Split menu button

The split menu button can have two different behaviors:

  1. The button always triggers the default action set by the app developer. If no default action has been defined, the first item in the menu list becomes the default.
  2. The button triggers the last action chosen by the user. Initially, it also triggers the default action. However, when the user selects a different action, this user action becomes the default, and the button text changes accordingly. The button has a fixed size and the text truncates if the menu item exceeds the available width (as with the combo box).

Behavior and Interaction

Buttons can be triggered through mouse, keyboard, touchscreen, and screen reader interaction.

If an action cannot be triggered, or is temporarily unavailable, use the disabled state for the corresponding button.

If you want to switch a text, icon or tooltip after a button click, bear in mind to use the invisible message control to also convey the information to screen reader listeners.

All three button types support the cozy and compact form factors. For more information, check out the article on content density.

Button states - regular, hover, pressed, focused, and disabled

Responsiveness

Button

The button usually grows to fit the size of the text. If you set a fixed size for the button, the text truncates.

If the button is used in a responsive container or toolbar, it follows the responsive behavior defined for that element. For example, the button can move to another line.

Button with different lengths and fixed size with truncated text

The maximum width of the menu button is 12 rem (192 px). If the button text exceeds the maximum or fixed width, it truncates.

On tablet and desktop devices (sizes M and L), the menu button triggers a cascading dropdown menu.

On smartphones (size S), the menu opens in a full screen dialog, and the button label becomes the title of the dialog. The footer contains a Cancel button. Items with submenus become navigable. Navigation is similar to that used in a popover, with a Back button.

Badge

The button can be visualized with a badge. This badge attracts the user’s attention and is typically used in browse and collect use cases. Badges are available for all types and sizes of the standard button.

There are two different badge types: counter badge and attention badge. A button can show either a counter badge or an attention badge, but never both.

Counter Badge

Counter badge on different button types

Attention Badge

Attention badge on different button types

Guidelines

Button Text

Icon Buttons

Button Shortcut

You can show the keyboard shortcut for an action. The keyboard shortcut appears on hover or on keyboard focus, and its positioning (top or bottom) is context-dependent. When a tooltip is needed, it is combined with the shortcut information.

hint
To show a keyboard shortcut, use sap.ui.core.CommandExecution. Do not use a tooltip.

Localization

The button supports left-to-right (LTR) and right-to-left (RTL) reading directions.

Button – left-to-right

Button – right-to-left

Elements and Controls

Implementation

Visual Design

Elements and Controls

Implementation