Intro

The expandable text control provides access to truncated text. A More/Less link shows or hides the full text. You can expand the text inline or display it in a popover, depending on your use case.

Expandable texts in a table

Expandable texts in a table

When to Use

Use expandable text if:

Do not use expandable text if:

Components

  • Text
  • More/Les s link
  • Optional: Popover

Behavior and Interaction

Expanding/Collapsing the Text

Clicking the More link after the truncated text expands the content inline or in a popover, based on the application settings. When the text is fully visible, the More link is replaced by a Less link.

Clicking the Less link collapses the content again. If a popover is used, it can be closed by clicking Less (1) or clicking anywhere outside the popover (2).

Empty State

The property emptyIndicatorMode behaves as in sap.m.Text. It allows developers to indicate empty texts to users with an n-dash (“-“).

Inline Text

Popover

Responsiveness

In sizes S, M, L, and XL, the text can be expanded inline or in a popover.

If you use a popover, the content is displayed in full screen mode on size S.

Size S – Inline Text

Expand text with 'More'

Expand text with 'More'

Text expanded inline, collapse with 'Less'

Text expanded inline, collapse with 'Less'

Size S – Popover

Expand text with 'More'

Expand text with 'More'

Popover text uses full screen, collapse with 'Close'

Popover text uses full screen, collapse with 'Close'

Top Tips

Elements and Controls

Implementation

Visual Design

  • Text (visual design specification)
  • Link (visual design specification)
  • Popover (visual design specification)