All Projects → dwicao → react-native-panel

dwicao / react-native-panel

Licence: other
A Customizable React Native Panel for Android and iOS

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-panel

Accordion
Silky-smooth accordion widgets with no external dependencies.
Stars: ✭ 32 (-8.57%)
Mutual labels:  accordion, dropdown, menu
Ng Pageslide
AngularJS sliding panel for serving additional content from off the page
Stars: ✭ 464 (+1225.71%)
Mutual labels:  slide, panel
CoolSlidingMenu
A powerful menu that you can customize it。
Stars: ✭ 25 (-28.57%)
Mutual labels:  slide, menu
Menu
The most customizable menu for macOS apps.
Stars: ✭ 84 (+140%)
Mutual labels:  dropdown, menu
django-menu-generator
A straightforward menu generator for Django
Stars: ✭ 24 (-31.43%)
Mutual labels:  simple, menu
vue-simple-context-menu
📌 Simple context-menu component built for Vue. Works well with both left and right clicks. Nothing too fancy, just works and is simple to use.
Stars: ✭ 162 (+362.86%)
Mutual labels:  simple, menu
Drawer Behavior Flutter
Drawer behavior is a library that provide an extra behavior on drawer, such as, move view or scaling view's height while drawer on slide.
Stars: ✭ 110 (+214.29%)
Mutual labels:  slide, menu
React Native Collapsible
Animated collapsible component for React Native, good for accordions, toggles etc
Stars: ✭ 2,178 (+6122.86%)
Mutual labels:  accordion, collapsible
Vue Slide Bar
🎢 A Simple Vue Slider Bar Component.
Stars: ✭ 129 (+268.57%)
Mutual labels:  slide, simple
clicky-menus
Simple click-triggered navigation submenus. Accessible and progressively enhanced.
Stars: ✭ 76 (+117.14%)
Mutual labels:  dropdown, menu
react-collapse
Component-wrapper for collapse animation with CSS for elements with variable and dynamic height
Stars: ✭ 143 (+308.57%)
Mutual labels:  accordion, collapsible
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+7620%)
Mutual labels:  panel, menu
Debuguisystem
Create a runtime menu system with buttons and windows for debugging in one line of code.
Stars: ✭ 48 (+37.14%)
Mutual labels:  panel, menu
Bmenu
A general purpose terminal menu that focuses on ease of configuration and use.
Stars: ✭ 94 (+168.57%)
Mutual labels:  simple, menu
React Sanfona
Accessible react accordion component
Stars: ✭ 248 (+608.57%)
Mutual labels:  accordion, collapsible
Duo Navigation Drawer
A flexible, easy to use, unique drawer library for your Android project.
Stars: ✭ 986 (+2717.14%)
Mutual labels:  slide, menu
Ng Bootstrap
Angular powered Bootstrap
Stars: ✭ 7,872 (+22391.43%)
Mutual labels:  accordion, dropdown
Core Components
Accessible and lightweight Javascript components
Stars: ✭ 85 (+142.86%)
Mutual labels:  accordion, dropdown
Xlslidemenu
iOS 仿QQ的左右抽屉效果
Stars: ✭ 122 (+248.57%)
Mutual labels:  slide, menu
ContextMenuSwift
A better version of iOS 13 Context Menu
Stars: ✭ 162 (+362.86%)
Mutual labels:  dropdown, menu

react-native-panel

demo
A Customizable React Native Panel for Android and iOS

  • note: It's lag due to gif recorder app, actually it works more smooth.

Installation

  • npm install --save react-native-panel

Usage

  • Just import Panel from the package and use your own component to render Header or Content.
  • Don't forget to wrap your Panel component inside ScrollView or ListView.
  • To render a content, you must wrap your component inside Panel (as a children).
  • See Example below for more details.

Example

import React, { Component } from 'react';
import {
  StyleSheet,
  Text,
  View,
  ScrollView,
} from 'react-native';
import Panel from 'react-native-panel';

class MyExample extends Component {
  renderFirstHeader() {
    return (
      <View style={styles.firstHeader}>
        <Text>This is Custom Header</Text>
      </View>
    );
  }

  render() {
    return (
      <ScrollView
        style={styles.container}
        contentContainerStyle={styles.contentContainerStyle}
      >
        <Panel
          style={styles.firstHeaderContainer}
          header={this.renderFirstHeader}
        >
          <Text style={styles.myDescription}>
            Lorem ipsum dolor sit amet, 
            consectetur adipiscing elit.
          </Text>
        </Panel>
        <Panel
          header="With onPress, yeaahhhh!!! It's so f#cking amazing wooohoooo..."
          onPress={() => alert("It's awesome, right?")}
        >
          <Text style={styles.myDescription}>
            Lorem ipsum dolor sit amet,
            consectetur adipiscing elit,
            sed do eiusmod tempor incididunt ut
            labore et dolore magna aliqua.
            Ut enim ad minim veniam, quis nostrud exercitation
            ullamco laboris nisi ut aliquip ex ea
            commodo consequat. Duis aute irure dolor in reprehenderit
            in voluptate velit esse cillum dolore eu
            fugiat nulla pariatur. Excepteur sint occaecat
            cupidatat non proident, sunt in culpa qui
            officia deserunt mollit anim id est laborum.
          </Text>
        </Panel>
        <Panel
          style={styles.thirdHeaderContainer}
          header="Custom container style"
        >
          <Text style={styles.myDescription}>
            Lorem ipsum dolor sit amet,
            consectetur adipiscing elit,
            sed do eiusmod tempor incididunt ut
            labore et dolore magna aliqua.
            Ut enim ad minim veniam, quis nostrud
            exercitation ullamco laboris nisi ut
            aliquip ex ea commodo consequat.
            Duis aute irure dolor in reprehenderit
            in voluptate velit esse cillum dolore
            eu fugiat nulla pariatur. Excepteur sint
            occaecat cupidatat non proident.
          </Text>
        </Panel>
        <Panel header="Custom content style">
          <View style={styles.customContent}>
            <View style={styles.square} />
            <View style={styles.circle} />
            <View style={styles.square} />
          </View>
        </Panel>
      </ScrollView>
    );
  }
}

const styles = StyleSheet.create({
  contentContainerStyle: {
    paddingTop: 30,
    paddingBottom: 20,
  },
  container: {
    flex: 1,
    backgroundColor: '#eee',
  },
  firstHeaderContainer: {
    backgroundColor: '#ccc',
  },
  firstHeader: {
    marginHorizontal: 10,
    backgroundColor: 'gray',
    alignItems: 'center',
    justifyContent: 'center',
    borderRadius: 15,
    height: 50,
  },
  thirdHeaderContainer: {
    margin: 15,
    backgroundColor: 'yellow',
  },
  myDescription: {
    padding: 10,
    paddingTop: 0,
  },
  customContent: {
    backgroundColor: '#bada55',
    flexDirection: 'row',
    justifyContent: 'space-around',
    alignItems: 'center',
    paddingVertical: 10,
  },
  square: {
    backgroundColor: 'yellow',
    width: 50,
    height: 50,
  },
  circle: {
    backgroundColor: 'blue',
    width: 50,
    height: 50,
    borderRadius: 25,
  },
});

export default MyExample;

Properties

props type description
header String / Function Use String or Function that render a React Element
onPress Function Invoke a function when the Panel header is pressed
style Object Custom wrapper style for Panel

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].