1.1.2 • Published 2 months ago

react-native-scroll-menu v1.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
2 months ago

platforms npm npm

react-native-scroll-menu

React native scrolling button horizontal

Installation

npm i react-native-scroll-menu
yarn add react-native-scroll-menu

Example

Example
npm.io
npm.io

Usage

import React, {Component} from 'react';
import {
    View
} from 'react-native';

//import this
import ScrollingButtonMenu from 'react-native-scroll-menu';


export default class Example extends Component
{

  render()
  {
    return (
        <ScrollingButtonMenu
            items={[
              {
                id: "1",
                name: 'Yaşam',
              },
              {
                id: "2",
                name: 'Zaman',
              },
              {
                id: "3",
                name: 'İnanç',
              },
              {
                id: "4",
                name: 'Cosmos',
              },
              {
                id: "5",
                name: 'Düşüş',
              },
            ]}
            onPress={(e) => {
              console.log(e);
            }}
            selected={"1"}
        />
    );
  }
}

//define menu
let menus = [
  {
    name: 'Sekiz',
    id: 1,
    backgroundColor: '#388E3C',
    borderColor: '#388E3C',
  },
  {
    text: 'Penguen',
    id: 2,
  }
];

Props

KeyTypeDescription
itemsArrayArray for button menu is required
onPressFunction(menu)Function when press button is required
upperCaseBooleanUppercase text (optional) default value => false
selectedOpacityNumberOpacity when pressed button (optional) default value => 0.7
containerStyleObject{}
contentContainerStyleObject{}
scrollStyleObject{}
textStyleObject{}
buttonStyleObject{}
activeButtonStyleObject{}
firstButtonStyleObject{}
lastButtonStyleObject{}
textStyleObject{}
activeTextStyleObject{}
activeColorstring"#fffff"
activeBackgroundColorstring"#fffff"
selectednumberitem id => 1
keyboardShouldPersistTapsstringdefault => always
1.1.2

2 months ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.3

3 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago