Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Incredibly simple utility for (sort of) using viewport units with React Native.

License

NotificationsYou must be signed in to change notification settings

jmstout/react-native-viewport-units

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Incredibly simple utility for (sort of) using viewport units withReact Native.

Install

$ npm install react-native-viewport-units --save

Usage

var{vw, vh, vmin, vmax}=require('react-native-viewport-units');

Notice the required operator/syntax:x * vw

<Viewstyle={{height:50*vh,width:50*vw}}/>
varstyles=StyleSheet.create({lookingGood:{width:15*vmin,height:10*vmax,padding:2*vw,margin:4*vh,}});

Roadmap

I would like to add support for orientation changes and reflowing components that use viewport units. I am, however, waiting until something official lands. Keeping a close eye on418.

License

MIT ©Jeff Stout

About

Incredibly simple utility for (sort of) using viewport units with React Native.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp