New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-layout

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-layout

Semantic JSX layout components for react-native

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-layout

Semantic JSX layout components for react-native

This project contains react-native layout components which brings more semantic to your JSX code.

It contains a "little bit more complex" BorderLayout, as well as really simple layout modules like Center, Fill, Header, Footer, and it also renames a view group as LinearLayout.

API, documentation and unit tests are WIP. Ideas, discussions and contributions are welcome: Open an issue

If your brave install the alpha version (0.0.x):

npm install react-native-layout --save

You can expect a beta version (0.1.0) soon.

Why?

Developing apps with react-native is great. But sometimes the JSX markup loses its simplicity with a growing number of components and view elements. Especially when you extracts and imports the stylesheets from an external file.

Examples

An example project is coming soon. Currently please checkout the examples folder and the following inline codes.

Screenshot of BorderLayoutExample1
BorderLayoutExample1.js

Screenshot of BorderLayoutExample2
BorderLayoutExample2.js

Screenshot of BorderLayoutExample3
BorderLayoutExample3.js

Center Content

Instead of:

<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
    <Text>Center Content</Text>
</View>

Write:

<Center>
    <Text>Center Content</Text>
</Center>

BorderLayout

Instead of:

<View style={{ flex: 1 }}>
    <View><Text>Header</Text></View>
    <View style={{ flex: 1 }}><Text>Content</Text></View>
    <View><Text>Footer</Text></View>
</View>

You could write:

<Fill>
    <Top><Text>Header</Text></Top>
    <Bottom><TextFooter</Text></Bottom>
    <View><Text>Content</Text></View>
</Fill>

Keywords

FAQs

Package last updated on 11 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc