1.0.4 • Published 2 years ago

swipeable-modal v1.0.4

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

swipeable-modal

A fully customizable swipeable modal

Installation

Install on your project with npm

  npm i swipeable-modal react-native-gesture-handler

Usage/Examples

import React, { useState } from 'react';
import { View, Text } from 'react-native';
import SwipableModal from 'swipeable-modal';

function App() {
  const [visibilityOfSwipableModal, setVisibilityOfSwipableModal] =
    useState(true);

  return (
    <View
      style={{
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#6082B6',
      }}
    >
      <Text style={{ color: '#000', fontSize: 22 }}>Testando modal</Text>
      <Text style={{ color: '#000', fontSize: 22 }}>Trying modal</Text>

      <SwipableModal
        visible={visibilityOfSwipableModal}
        disappearOnSwipingDown={false}
        height={250}
      >
        <Text style={{ color: '#000' }}>Content of Modal</Text>
      </SwipableModal>
    </View>
  );
}

export default App;

Screenshots

image image

Simple video of example

https://github.com/eliezerBrasilian/swipeable-modal/assets/93846923/6ee96693-76bd-49a2-a39b-8e559bcb826a

All the Props

ParameterConditionDescription
childrenRequired.View,Text,ScrollView, etc...
ParameterTypeDescription
visiblebooleancontrol the visibility of modal
ParameterTypeDescription
borderRadiusnumbercontrol the border of modal
ParameterTypeDescription
borderColorstringcontrol the border color of modal
ParameterTypeDescription
borderWidthnumbercontrol the width of border of modal
ParameterTypeDescription
heightnumbercontrol the minimum heigth of modal
ParameterTypeDescription
disappearOnSwipingDownbooleancontrol if modal should disappear after swiped down
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago