1.2.3 • Published 4 years ago

react-native-focus-list v1.2.3

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

react-native-focus-list

npm version runs with expo

A React Native component that gets a list and highlights a selected item and shows the items that are near.

Installation

npm install --save react-native-focus-list

Usage

import React, { Component } from 'react';
import FocusList from 'react-native-focus-list';

export default class App extends Component {
    render() {
        return <FocusList dataArray={[1, 2, 3, 4, 5]} marginFirst={20}/>
    }
}

Properties

NameTypeDefaultDescription
dataArrayarray<any>REQUIREDThe data array
marginFirstnumber20Margin for the first item in the array
itemComponentelementItem from Item.jsCustom wrapper component for list item
startNumbernumber0The initial index that will be highlighted

Methods

NameDescription
moveForward()Moves forward in the lst
moveBack()Moves backward in the list

Full demo

run in expo snack

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago