All Projects → lvlrSajjad → react-native-masonry-brick-list

lvlrSajjad / react-native-masonry-brick-list

Licence: MIT license
Staggered Or Masonary List View For React Native Written in pure js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-masonry-brick-list

React Native Sglistview
SGListView is a memory minded implementation of React Native's ListView
Stars: ✭ 745 (+3004.17%)
Mutual labels:  listview, react-native-component
react-native-card-list
A React Native component which displays a list of image cards that zoom to fullscreen
Stars: ✭ 19 (-20.83%)
Mutual labels:  listview, react-native-component
recycler-adapter
RecyclerView-driven declarative UIs
Stars: ✭ 124 (+416.67%)
Mutual labels:  view, listview
React Native Sortable List
React Native Sortable List component
Stars: ✭ 678 (+2725%)
Mutual labels:  listview, react-native-component
react-native-responsive-image-view
React Native component for scaling an Image within the parent View
Stars: ✭ 152 (+533.33%)
Mutual labels:  view, react-native-component
SMDiagramView
Diagram View for iOS
Stars: ✭ 44 (+83.33%)
Mutual labels:  view
KVSpinnerView
KVSpinnerView is highly customizable progress HUD
Stars: ✭ 37 (+54.17%)
Mutual labels:  view
imgui
Dear ImGui Addons Branch = plain unmodified dear imgui plus some extra addon.
Stars: ✭ 348 (+1350%)
Mutual labels:  listview
view
Yii view rendering library
Stars: ✭ 42 (+75%)
Mutual labels:  view
SPConfetti
Show the confetti only when the user is having fun, and if not having fun, don't show it.
Stars: ✭ 187 (+679.17%)
Mutual labels:  view
android-page
android 分页列表数据加载引擎,主要封装了android分页列表数据加载的各个组件,如果你有一个需要分页加载的List列表,都可以使用此框架实现。
Stars: ✭ 15 (-37.5%)
Mutual labels:  listview
GenericAdapter
⛳️ Easy to use android databinding ready recyclerview adapter
Stars: ✭ 26 (+8.33%)
Mutual labels:  listview
LimitlessUI
Awesome C# UI library that highly reduced limits of your application looks
Stars: ✭ 41 (+70.83%)
Mutual labels:  listview
react-native-wxui
A UI package for React Native
Stars: ✭ 21 (-12.5%)
Mutual labels:  listview
SignatureView
【Android View】:好用的Android电子签名板,能保存所签名的图片
Stars: ✭ 89 (+270.83%)
Mutual labels:  view
yii2-presenter
Yii2 View Presenter
Stars: ✭ 13 (-45.83%)
Mutual labels:  view
credit-card-view
A fully customizable Android view that can display credit card's informations
Stars: ✭ 25 (+4.17%)
Mutual labels:  view
react-native-nested-listview
A UI component for React Native for representing nested arrays of N levels
Stars: ✭ 163 (+579.17%)
Mutual labels:  listview
react-native-paginated-listview
A simple paginated react-native ListView with a few customization options
Stars: ✭ 14 (-41.67%)
Mutual labels:  listview
android-animations
Perform tweened animations such as Attention, Bounce, Fade, Flip, Rotate, Slide and Zoom on Views
Stars: ✭ 118 (+391.67%)
Mutual labels:  view

react-native-masonry-brick-list npm version Maintainability Test Coverage

this is a staggered List view for react native (pure Js)

Installation

$ npm install react-native-masonry-brick-list --save

Usage

just be sure that in your list id and span is specified

and use it as below

Props{data (array), renderItem (react Component), columns (int), rowHeight (int) }

import BrickList from 'react-native-masonry-brick-list';
import React, {Component} from 'react';
import {View, Text} from 'react-native'


type Props = {};
export default class App extends Component<Props> {
    constructor(props){
        super(props);
        this.state={
            //Just id (unique) and span (1,2,3, ...) is required
            data:[
                {id: '1', name: "Red", color: "#f44336", span: 1},
                {id: '2', name: "Pink", color: "#E91E63", span: 2},
                {id: '3', name: "Purple", color: "#9C27B0", span: 3},
                {id: '4', name: "Deep Purple", color: "#673AB7", span: 1},
                {id: '5', name: "Indigo", color: "#3F51B5", span: 1},
                {id: '6', name: "Blue", color: "#2196F3", span: 1},
                {id: '7', name: "Light Blue", color: "#03A9F4", span: 3},
                {id: '8', name: "Cyan", color: "#00BCD4", span: 2},
                {id: '9', name: "Teal", color: "#009688", span: 1},
                {id: '10', name: "Green", color: "#4CAF50", span: 1},
                {id: '11', name: "Light Green", color: "#8BC34A", span: 2},
                {id: '12', name: "Lime", color: "#CDDC39", span: 3},
                {id: '13', name: "Yellow", color: "#FFEB3B", span: 2},
                {id: '14', name: "Amber", color: "#FFC107", span: 1},
                {id: '15', name: "Orange", color: "#FF5722", span: 3},
            ],
        }
    }


    render() {
        return (
            <BrickList
            data = {this.state.data}
            renderItem={(prop)=>renderView(prop)}
            columns = {3}
            />
        );
    }
}
//RenderAnyItem
renderView=(prop)=>{
    return(
        <View key={prop.id} style={{
            margin: 2,
            borderRadius: 2,
            backgroundColor: prop.color,
            flex:1,
            alignItems:'center',
            justifyContent:'center',
        }} >
            <Text style={{color:'white'}}>{prop.name}</Text>
        </View>
    )
};
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].