Skip to Content

Embedding a custom CSS style class to a SAPUI5 control

The visual display of SAP UI5 controls can be edited in various ways. One simple way is to define an own CSS style class and to embed it to the SAP UI5 Control. It is verry simple:

Extending the SAP UI5 INDEX file

Add a new css class to the index.html. Of Course, there are also other ways (external css file, … ) – but in this example we will add the style-class direct in the index.html file;


Adjusting the SAP UI5

Use the method addStyleClass to add the new css class to the sap ui5 control:



Not very surprisingly, the font color is whit, black background and italic:


You must be Logged on to comment or reply to a post.