Intro

The panel is a container for grouping and displaying information. It can be collapsed to save space on the screen.

Usage

Use the panel if:

Do not use the panel if:

Responsiveness

If the width of the panel is set to 100% (default), the panel and its children are resized responsively, depending on its parent container.

Layout

Examples

Panel with a header text

Panel with a header text

Panel with a header toolbar and a infobar

Panel with a header toolbar and a infobar

Types

There are two types of panels: fixed and expandable.

Fixed Panel

Fixed panels are useful for grouping custom content. They include headers and infobars.

Fixed panel with a picture

Fixed panel with a picture

Expandable Panel

Expandable panels are much like fixed panels, except their content can be expanded and collapsed by clicking on the title bar.

Expandable panel – Collapsed

Expandable panel – Collapsed

Expandable panel – Expanded

Expandable panel – Expanded

Components

A panel consists of a title bar with a header text or header toolbar, an infobar (optional), and a content area.

The title inside the title bar can be added by using the “headerText” property. If you use the “headerToolbar” aggregation, the “headerText” property is ignored. With the “headerToolbar” aggregation, you can add a toolbar with any toolbar content inside the title bar. For example, if you need a title text on the left and some action buttons on the right, add a title to the toolbar’s content aggregation, toolbar spacer, and then your buttons.

Header toolbar of a panel

Header toolbar of a panel

Behavior and Interaction

Expand/Collapse

  • When the panel is expandable, an arrow icon (pointing to the right) appears in front of the header.
  • Click anywhere on the title bar to expand and collapse the content area.
  • When the animation is activated, expand/collapse uses a smooth animation to open or close the content area.
  • When the panel expands, the arrow icon rotates 90 degrees clockwise.
  • When the panel collapses, the arrow icon rotates 90 degrees counterclockwise.
  • The buttons in the header can be clicked separately.

Overflow Scrolling (Content Area)

Panel With Scrolling

Panel with a fixed height (scrolling activated)

Panel with a fixed height (scrolling activated)

Panel Without Scrolling

Panel with auto height (no scrolling)

Panel with auto height (no scrolling)

Guidelines

Exceptions

If you add a header toolbar (sap.m.Toolbar) via aggregations, it will overwrite the “headerText” property.

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation

  • Panel (SAPUI5 samples)
  • Panel (SAPUI5 API reference)

Visual Design

  • Panel (visual design specification)

Elements and Controls

Implementation

  • Panel (SAPUI5 samples)
  • Panel (SAPUI5 API reference)