Skip to content

Orientation aware view for build a responsive ui (React Native)

Notifications You must be signed in to change notification settings

Agaweb/react-native-orientation-aware-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native Orientation Aware View

Getting started

$ npm i @agaweb/react-native-orientation-aware-view

Usage

The view inherits all the props and adds four others.

Props :

  • style: default, both in portrait and landscape
  • portraitStyle: will be merged with the default style when the orientation is portrait
  • landscapeStyle: will be merged with the default style when the orientation is landscape
  • hideOnPortrait: won't render the view on portrait
  • hideOnLandscape: won't render the view in landscape

Example

import OrientationAwareView from "@agaweb/react-native-orientation-aware-view";

<OrientationAwareView
    style={{ flex: 1 }}
    portraitStyle={{ backgroundColor: "red" }}
    landscapeStyle={{ backgroundColor: "blue" }}>
    ...
</OrientationAwareView>

About

Orientation aware view for build a responsive ui (React Native)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published