Class sap.m.TitleModule: sap/m/Title
The Title control represents a single line of text with explicit header / title semantics.
Since: 1.27.0.
sClassName
and enriches it with the information contained in oClassInfo
. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.
The supported settings are:
- Properties
- text : string
- level : sap.ui.core.TitleLevel (default: Auto)
- titleStyle : sap.ui.core.TitleLevel (default: Auto)
- width : sap.ui.core.CSSSize
- textAlign : sap.ui.core.TextAlign (default: Initial)
In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.
{string} | sId? | Id for the new control, generated automatically if no id is given |
{object} | mSettings? | Initial settings for the new control |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
level
. Defines the semantic level of the title. This information is e.g. used by assistive technologies like screenreaders to create a hierarchical site map for faster navigation. Depending on this setting either a HTML h1-h6 element is used or when using level Auto
no explicit level information is written (HTML5 header element).
Default value is Auto
.
{sap.ui.core.TitleLevel} | Value of property level |
text
. Defines the text which should be displayed as a title.
{string} | Value of property text |
textAlign
. Defines the alignment of the text within the title. Note: This property only has an effect if the overall width of the title control is larger than the displayed text.
Default value is Initial
.
{sap.ui.core.TextAlign} | Value of property textAlign |
title
, or null
. {sap.ui.core.Title} |
titleStyle
. Defines the style of the title. When using the Auto
styling, the appearance of the title depends on the current position of the title and the defined level. This automatism can be overridden by setting a different style explicitly. The actual appearance of the title and the different styles always depends on the theme being used.
Default value is Auto
.
{sap.ui.core.TitleLevel} | Value of property titleStyle |
width
. Defines the width of the title.
{sap.ui.core.CSSSize} | Value of property width |
level
. Defines the semantic level of the title. This information is e.g. used by assistive technologies like screenreaders to create a hierarchical site map for faster navigation. Depending on this setting either a HTML h1-h6 element is used or when using level Auto
no explicit level information is written (HTML5 header element).
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Auto
.
{sap.ui.core.TitleLevel} | sLevel | New value for property level |
{sap.m.Title} | Reference to this in order to allow method chaining |
text
. Defines the text which should be displayed as a title.
When called with a value of null
or undefined
, the default value of the property will be restored.
{string} | sText | New value for property text |
{sap.m.Title} | Reference to this in order to allow method chaining |
textAlign
. Defines the alignment of the text within the title. Note: This property only has an effect if the overall width of the title control is larger than the displayed text.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Initial
.
{sap.ui.core.TextAlign} | sTextAlign | New value for property textAlign |
{sap.m.Title} | Reference to this in order to allow method chaining |
title
. {sap.ui.core.Title} | oTitle | Id of an element which becomes the new target of this title association; alternatively, an element instance may be given |
{sap.m.Title} | Reference to this in order to allow method chaining |
titleStyle
. Defines the style of the title. When using the Auto
styling, the appearance of the title depends on the current position of the title and the defined level. This automatism can be overridden by setting a different style explicitly. The actual appearance of the title and the different styles always depends on the theme being used.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Auto
.
{sap.ui.core.TitleLevel} | sTitleStyle | New value for property titleStyle |
{sap.m.Title} | Reference to this in order to allow method chaining |
width
. Defines the width of the title.
When called with a value of null
or undefined
, the default value of the property will be restored.
{sap.ui.core.CSSSize} | sWidth | New value for property width |
{sap.m.Title} | Reference to this in order to allow method chaining |