Intro
The bar is a container used to hold titles, subtitles, buttons, and input elements. It typically appears at the top of a screen or section to provide access to navigation, actions, and key content.
Bar component with back navigation on the left and a filter action icon on the right
Component availability
This component is available in the following libraries:
When to Use
Use the bar to:
- Display page headers, subheaders, footers, and floating footers used on a page, dialog, or popover.
- Include only a small number of components.
Don't use the bar to:
- Include many components that require an overflow menu. Use the toolbar instead.
- Limit the number of actions within the bar.
- Use the full width of the screen for the bar.
- Place the bar at the top of a container, such as a page, popover, and so on, to provide contextual actions and information.
- Place the footer bar at the bottom of the page or container to provide final actions.
Anatomy
The bar defines left and right areas for navigation and actions.
- Start content: Left-aligned content area for navigation elements like back buttons, titles, menus, or logos.
- End content: Right-aligned content area for actions like buttons, icons, or user profiles.
- Bar container: Provides the structural layout.
Bar anatomy
Types
Header bar
The bar is used as a header for a container. It can appear without a navigation button (A) or with a navigation button (B), such as Back or Home.
Header bar with title only (A), and with title and “Back” button (B)
Bar with subheader
When the bar is used as a header of a container, it can include an additional subheader for elements such as subtitle, search, or other components. The content of the bar can vary depending on the use case.
A. Standard bar with subheader.
B. Header bar with back navigation arrow, title, action elements, and subheader.
C. Header bar containing a subheader with search bar.
Bar with subheader
Footer bar
The bar stays fixed at the bottom of the container and provides final actions.
Footer bar type
Floating footer bar
The bar stays above the page content and moves with scrolling, always visible at the bottom of the screen. Padding from the screen edge improves visibility and usability.
Floating footer bar type
States
Busy State
After interaction, the system may take time to respond. In this case, the bar can enter a busy state to indicate that processing is in progress.
Elements inside the bar have states, but the bar itself is only a container and supports no states except the busy state.
Bar with busy state
Behavior and Interaction
Use the bar for simple scenarios with up to two interactive elements, such as buttons or input fields. The bar component does not support overflow behavior. If you need more than two interactive elements or require responsive overflow handling, use the toolbar component instead.
Responsiveness
The bar component is not fully responsive. When space is limited to display all elements in a header bar, use the bar with subheader variant to distribute the content. For example, use a bar with subheader on mobile, and a header bar on desktop.
Bar with subheader used to display content when space is limited.
For more information, see Content Density.
Accessibility
SAP follows international standards, such as WCAG and WAI-ARIA, and strives to make our business solutions accessible and inclusive.
For more information, see Accessibility in SAP Fiori and the Accessibility Design Tools Handbook.
Keyboard navigation
The following keyboard combinations are supported by the SAPUI5 Bar component.
Screen reader support
For additional details on screen reader support and Accessible Rich Internet Applications (ARIA), see the UI5 Screen Reader Support and WAI-ARIA Authoring.
Content
Localization
The bar component supports both left-to-right (LTR) and right-to-left (RTL) reading directions. Action buttons (for example, Confirm and Cancel) are end-aligned, appearing on the right in LTR layouts and on the left in RTL layouts.
Bar in left-to-right mode
Bar in right-to-left mode
Framework Comparison Overview
There are no differences between SAPUI5 and SAP Web Components regarding thе component's behaviors and framework-specific patterns.