ons-if-orientation

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>
</div>

See also #

Attributes #

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

Discussion #