Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rundmt/react-native-flexbox-grid
Responsive Grid for React Native
https://github.com/rundmt/react-native-flexbox-grid
flexbox-grid grid layout react-native responsive
Last synced: 2 days ago
JSON representation
Responsive Grid for React Native
- Host: GitHub
- URL: https://github.com/rundmt/react-native-flexbox-grid
- Owner: rundmt
- License: mit
- Created: 2015-12-03T16:39:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-06-18T13:05:23.000Z (over 1 year ago)
- Last Synced: 2024-10-16T07:31:00.965Z (3 months ago)
- Topics: flexbox-grid, grid, layout, react-native, responsive
- Language: JavaScript
- Homepage:
- Size: 20.5 KB
- Stars: 99
- Watchers: 7
- Forks: 17
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
### Warning: This package is no longer maintained
# Flexbox Grid
A Set of React Native Components to make a grid easier to reason about.
# The Problem
Responsive Design is easy on the web but a bit harder on a mobile app.I'm experimenting with using a CSS type grid to have conditional looks based on device width similar to media queries.
# Getting Started
### Installation
In your react native project
```
npm install react-native-flexbox-grid
```### Import
```
import {Column as Col, Row} from 'react-native-flexbox-grid';
```### Basic Example
```
First Column
Second Column
```
The api is inspired by
[react-flexbox-grid](https://www.npmjs.com/package/react-flexbox-grid), but it is not exactly the same.The main difference is you can specify the grid size. By default `` is a size of 12. However if you want you can make a `` any size you want.
### More Documentation
[Documentation](https://github.com/rundmt/react-native-flexbox-grid/wiki/Documentation)
#### Changes for 0.3.0
React Native now supports percentages as of 0.42. All of our versions going forward will rely on percentages. It has much faster performance compared to what we did before when we relied on `onLayout`. The API for apps is the same. There should be no difference in expected output of your app.
#### Changes for 0.2.0
As of 0.2.0 Row will automatically wrap components. If you do not want components to automatically wrap you must specify `nowrap` in the row's prop.
```
```## Known Issues
For react-native 0.41 and earlier you muse use `[email protected]` or earlier.
Since React Native before 0.41 and earlier doesn't support percentages we have to rely on using React Native's `onlayout` to pass the width of the parent to the child. This causes layouts to be a bit slow, because the child has to wait for the parent to layout and then rerender. This problem is resolved by using react native 0.42 and the `[email protected]` or later.
### What's working
* Basic Grid
* Styles
* Hiding Items
* Basic Unit Testing### To Do
* Integration Testing. (Possibly New Examples Repo)