GridView
An auto-generated grid view that calculate item size according to given props
(code example)
#
Usage<GridView items={[{title: 'item 1', onPress: () => console.log('item 1 pressed')}, {title: 'item 2', onPress: () => console.log('item 2 pressed')}]} numColumns={2} lastItemLabel={'+'} lastItemOverlayColor={'Colors.rgba(Colors.blue30)'}/>
#
API#
itemSpacingSpacing between each item
number
#
itemsThe list of items based on GridListItem props
GridListItemProps[]
#
keepItemSizewhether to keep the items initial size when orientation changes, in which case the apt number of columns will be calculated automatically.
boolean
#
lastItemLabeloverlay label for the last item
string | number
#
lastItemOverlayColorcolor of overlay label for the last item
string
#
numColumnsNumber of items to show in a row
number
#
renderCustomItemPass to render a custom item
(item: GridListItemProps) => React.ReactElement
#
viewWidthpass the desired grid view width (will improve loading time)
number