react-native-bpk-component-carousel-indicator

3.0.1 • Public • Published

react-native-bpk-component-carousel-indicator

Backpack React Native carousel indicators component.

Installation

npm install react-native-bpk-component-carousel-indicator --save-dev

Usage

import React, { Component } from 'react';
import { View, StyleSheet } from 'react-native';
import { spacingBase } from 'bpk-tokens/tokens/base.react.native';
import BpkCarouselIndicator from 'react-native-bpk-component-carousel-indicator';
 
const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    padding: spacingBase,
  },
});
 
export default class App extends Component {
  render() {
    return (
      <View style={styles.container}>
        <BpkCarouselIndicator pageCount="10" selectedIndex="0" />
        <BpkCarouselIndicator pageCount="3" selectedIndex="2" />
        <BpkCarouselIndicator pageCount="5" selectedIndex="1" />
      </View>
    );
  }
}

Props

Property PropType Required Default Value
pageCount number true -
selectedIndex number true -

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-bpk-component-carousel-indicator

Weekly Downloads

7

Version

3.0.1

License

Apache-2.0

Unpacked Size

51.8 kB

Total Files

17

Last publish

Collaborators

  • ojcurt
  • frugoman
  • gert-jan.vercauteren
  • mungodewar
  • skyscanner-koalasquad
  • anambl
  • shaundon