Conditionally display content depending on screen orientation. Valid values are portrait and landscape. Different from other components, this component is used as attribute in any element.

Usage #

<div ons-if-orientation="portrait">
  <p>This will only be visible in portrait mode.</p>

See also #

Attributes #

Name Type
Default Value
ons-if-orientation String Either "portrait" or "landscape". Optional

Discussion #