Coder Social home page Coder Social logo

femotizo / react-native-scrolling-menu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 7kfpun/react-native-scrolling-menu

0.0 2.0 0.0 22 KB

A horizontal scrolling menu for React Native.

License: GNU General Public License v3.0

JavaScript 100.00%

react-native-scrolling-menu's Introduction

React Native Scrolling Menu

A horizontal scrolling menu for React Native.

Screenshot

Installation

npm install --save react-native-scrolling-menu

React Native

var ScrollingMenu = require('react-native-scrolling-menu');

Usage

let items = ['Menu Item 1','Menu Item 2','Menu Item 3','Menu Item 4','Menu Item 5'];

onClick(itemIndex) {
  console.log("Selected: " + items[itemNum]);
}

render() {
  return (
    <ScrollingMenu
      items={items}
      callback={this.onClick.bind(this)}
      backgroundColor="#ffffff"
      textColor="#cccccc"
      selectedTextColor="#000000"
      itemSpacing={20} />
  );
}

Props

Key Type Description
items Array An array of items for the menu
callback Function(itemIndex) The callback function sends the index of the menu item selected
backgroundColor String (HEX) The background color of the menu
textColor String (HEX) The text color prior to being selected
selectedTextColor String (HEX) The text color of the selected item
itemSpacing Number The number of pixels between the menu items

react-native-scrolling-menu's People

Contributors

mikeahirsch avatar 7kfpun avatar

Watchers

James Cloos avatar Epebinu Oluwafemi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.