Coder Social home page Coder Social logo

hieucoi96 / react-native-modalize Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeremybarbet/react-native-modalize

0.0 0.0 0.0 2.53 MB

A highly customizable modal/bottom sheet that loves scrolling content.

Home Page: https://jeremybarbet.github.io/react-native-modalize

License: MIT License

Shell 1.47% JavaScript 2.54% TypeScript 95.99%

react-native-modalize's Introduction

Modalize

npm version

A highly customizable modal/bottom sheet that loves scrolling content.

This component has been built with react-native-gesture-handler to address the common issue of scrolling, swiping and handling the keyboard behaviors, you can face with react-native's modal.

This component comes with a ScrollView, the default renderer, a FlatList or a SectionList. They are all three built-in and make your life easier, just pass your content and Modalize will handle the rest for you. You can also have the possibility to pass your own custom renderer.

Simple Fixed Snapping Absolute FlatList Open Apple Facebook Slack

Installation

yarn add react-native-modalize react-native-gesture-handler
iOS
npx pod-install ios
Android

React Native <= 0.59

Follow this guide to complete the Android installation.

React Native > 0.60

You don't need to follow the guide mentioned above because autolinking from React already did the steps.

Usage

Here is a quick example, using the default ScrollView renderer.

import React, { useRef } from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { Modalize } from 'react-native-modalize';

export const App = () => {
  const modalizeRef = useRef<Modalize>(null);

  const onOpen = () => {
    modalizeRef.current?.open();
  };

  return (
    <>
      <TouchableOpacity onPress={onOpen}>
        <Text>Open the modal</Text>
      </TouchableOpacity>

      <Modalize ref={modalizeRef}>...your content</Modalize>
    </>
  );
};

Documentation

Please check out the full documentation available here to find all about the props, methods and examples of Modalize's usage.

react-native-modalize's People

Contributors

archansel avatar artxty avatar bcpugh avatar caiangums avatar charpeni avatar dependabot[bot] avatar enniel avatar erkki-lukk avatar esirei avatar fortezhuo avatar grohden avatar hagmic avatar harrigee avatar helderberto avatar jeremybarbet avatar jordanl17 avatar kotielnikov avatar lucidninja avatar maryjenel avatar nwaughachukwuma avatar omgdef avatar petterruud avatar ragularuban avatar renovate-bot avatar renovate[bot] avatar stephenlacy avatar vforvasile avatar wandersonalwes avatar wesleyfaveri avatar xxsnakerxx 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.