Tabris.js Properties: elevation
The elevation
property makes a widget appear elevated by casting a shadow around it. A number value, it positions the widget on the z-axis.
This is useful for drawing the user’s attention to particular parts of the UI.
On Android, the widget’s elevation
property has to be set in conjunction with its background property for the shadow to appear properly.
This example from Tabris playground shows an elevated Composite
widget. Note the background property is also explicitly set.
A widget’s shadow follows the contour of the widget’s border. In this example, see how the shadow follows the curved corners?
For more information about the properties, methods, and events of the Widget base class check out the documentation.
To tinker with code download the Tabris app and run the code snippets from the Tabris playground.
Feedback is welcome!
Want to join the discussion?Feel free to contribute!