npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-section-menu

v0.1.0

Published

A multi-platform React Native sectioned menu

Downloads

9

Readme

react-native-section-menu

Build Status

A multi-platform React Native sectioned menu.

Installation

$ npm i --save-dev react-native-section-menu

Usage

To render a basic menu, take the following code as an example. It will render a green header in Android with a drawer-based animation and a TabBar navigation for iOS. You can combine this component with react-native-vector-icons to fully customize the icons of your menu.

import { Menu } from 'react-native-section-menu'

class MyMenu extends React.Component {
  render () {
    return (
      <Menu
        header={<View style={{height: 150, backgroundColor: '#27ae60'}} />}
        initialEntry={0}
        tintColor='#27ae60'
        entries={[
          {
            id: 0,
            element: <View style={{flex: 1, backgroundColor: '#95a5a6'}} />,
            title: 'Bookmarks',
          },
          {
            id: 1,
            element: <View style={{flex: 1, backgroundColor: '#2c3e50'}} />,
            title: 'Contacts',
          },
          {
            id: 2,
            element: <View style={{flex: 1, backgroundColor: '#ecf0f1'}} />,
            title: 'Search',
          }
        ]}
      />
    )
  }
}

API

Required

| Prop | Type | Description | |------|------|-------------| | entries | Array<Entry> | An array of menu entries. |

Entry object

| Prop | Type | Description | |------|------|-------------| | id | number | A numeric identifier. | | title | string | The title of the section. | | element | element | The element to render in the section. |

Not required

| Prop | Type | Description | |------|------|-------------| | initialEntry | number | A number to mark the entry to render by default. |

iOS specific

| Prop | Type | Description | |------|------|-------------| | | TabBarIOS.propTypes | You can pass all the props. Docs here. |

Entry object

| Prop | Type | Description | |------|------|-------------| | itemComponent | func | Pass here Icon.TabBarItemIOS to use react-native-vector-icons TabBar item. | | iconName | string | The react-native-vector-icons icon name. | | selectedIconName | string | The react-native-vector-icons selected icon name. | | iconSize | number | The react-native-vector-icons icon size. |

Android specific

| Prop | Type | Description | |------|------|-------------| | | DrawerLayoutAndroid.propTypes | DrawerLayoutAndroid available props. | | containerStyle | View.propTypes.style | The style of the parent container view. | | header | node | Optional header to display above the menu list. |

Entry object

| Prop | Type | Description | |------|------|-------------| | androidIcon | node | A React node to render as an icon. | | androidBackground | TouchableNativeFeedback.propTypes.background | The background effect of the entry section. | | tintColor | string | The tint color of the selected entry. |

License

MIT

How to contribute

Please open an issue or send a PR ☺️.

Authors

Álvaro Medina Ballester amedina at apsl.net.

Dani Sastre sastred at apsl.net