Intro
Text used within a form
Usage
Use the text control if you want to display text inside a form, table, or any other content area. Do not use the text control if you need a label, or vice versa.
Responsiveness
The text control is fully adaptive to all screen sizes. You can also set a specific width and overwrite the default value. The resizing behavior depends on the settings that the apps use for the text.
Wrapping / Truncation
You can define whether the text should wrap or truncate directly (property: wrapping).
You can also define how often the text should wrap before it truncates (property: maxLines).
For more information on using wrapping and truncation, see Wrapping and Truncating Text.
Text – Maximum line examples
Hyphenation
Hyphenated). Switching on hyphenation activates it for all languages that have hyphenation support.
[internal_only]
In the future, we plan to apply hyphenation only to a predefined set of languages (for example, languages that have a lot of long or compound words).
This will avoid unnecessary hyphenation in languages that have shorter words, such as English.
[/internal_only]
Text with hyphenation
Text without hyphenation
White Spaces
White spaces are rendered
Unnecessary white spaces are removed (default)
Guidelines
Empty Indicator Mode
The emptyIndicatorMode property in sap.m.Text allows app developers to indicate an empty text to users by using an n-dash (“–”). If turned on, an n-dash is rendered when no text is visible. If turned off (default), the behavior is as it is. Depending on the language, the symbol may change.
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
- Label (guidelines)
- Wrapping and Truncating Text (guidelines)
Implementation
- Text (SAPUI5 samples)
- Text (SAPUI5 API reference)
- Hyphenation for Text Controls (SAPUI5 documentation)
Visual Design
- Text (visual design specification)