• Stars
    star
    307
  • Rank 131,655 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚛ Cross-platform React Native dialogs based on the Modal component

React Native Simple Dialogs

License MIT npm version npm downloads

Cross-platform React Native dialogs based on the Modal component.

Features

Expo Snack

An Expo Demo Link

Screenshots

Android iOS

Requirements

  • React Native >= 0.44.0

NOTES

Install

  yarn add react-native-simple-dialogs

Or

  npm i -S react-native-simple-dialogs

Use

Custom Dialog

import { Dialog } from 'react-native-simple-dialogs';

<Dialog
    visible={this.state.dialogVisible}
    title="Custom Dialog"
    onTouchOutside={() => this.setState({dialogVisible: false})} >
    <View>
        // your content here
    </View>
</Dialog>

Available props

Name Type Default Description
visible Boolean false Show the modal?
onRequestClose Function null Callback that's called when users taps the hardware back button on Android
animationType Enum('none', 'slide', 'fade') 'none' Controls how the modal animates
onShow Function null Callback that's called once the modal has been shown
onOrientationChange Function null Callback that's called when the orientation change while the modal is being displayed on iOS
supportedOrientations Array of Enum('portrait', 'portrait-upside-down', 'landscape', 'landscape-left', 'landscape-right') 'portrait' Allowed orientation while modals is being shown. More info at react-native docs
statusBarTranslucent Boolean null Determines whether your modal should go under the system statusbar. More info at react-native docs
onTouchOutside Function null Callbac that's called when users tap outside the shown modal
title String null Modal's title
titleStyle Text StyleSheet null Custom text style object for modal's title
dialogStyle View StyleSheet null Custom view style for dialog box
contentStyle View StyleSheet null Custom view style for dialog content wrapper
buttonsStyle View StyleSheet null Custom view style for dialog button wrapper
overlayStyle View StyleSheet null Custom view style for dialog overlay
buttons React Node null Modal button component
keyboardDismissMode Enum('none', 'on-drag', 'interactive') null Determines whether the keyboard gets dismissed in response to a drag.
keyboardShouldPersistTaps Enum('always', 'never', 'handled', false, true) null Determines when the keyboard should stay visible after a tap.

Confirm Dialog

import { ConfirmDialog } from 'react-native-simple-dialogs';

// with message
<ConfirmDialog
    title="Confirm Dialog"
    message="Are you sure about that?"
    visible={this.state.dialogVisible}
    onTouchOutside={() => this.setState({dialogVisible: false})}
    positiveButton={{
        title: "YES",
        onPress: () => alert("Yes touched!")
    }}
    negativeButton={{
        title: "NO",
        onPress: () => alert("No touched!")
    }}
/>

// with custom content
<ConfirmDialog
    title="Confirm Dialog"
    visible={this.state.dialogVisible}
    onTouchOutside={() => this.setState({dialogVisible: false})}
    positiveButton={{
        title: "OK",
        onPress: () => alert("Ok touched!")
    }} >
    <View>
        // your content here
    </View>
</ConfirmDialog>

Available props

Name Type Default Description
...{Dialog.props} Dialog Props null Same props as Dialog Component
message String null Message shown in the confirm dialog
messageStyle Text StyleSheet null Custom text style for message
negativeButton Button Props null Button element object to describe the negative button. See below for detailed shape of button
positiveButton Button Props REQUIRED Button element object to describe the positive button. See below for detailed shape of button
Button props
Name Type Default
title String REQUIRED
onPress Function REQUIRED
disabled Boolean null
titleStyle Text StyleSheet null
style View StyleSheet null

Progress Dialog

import { ProgressDialog } from 'react-native-simple-dialogs';

<ProgressDialog
    visible={this.state.progressVisible}
    title="Progress Dialog"
    message="Please, wait..."
/>

Available props

Name Type Default Description
...{Dialog.props} Dialog Props null Same props as Dialog Component
message String null Message shown in the progress dialog
messageStyle Text StyleSheet null Custom text style for message
activityIndicatorColor color null The foreground color of the spinner
activityIndicatorSize enum('small', 'large'), number null Size of the indicator. Number only supported on Android
activityIndicatorStyle View StyleSheet null Custom style for the activity indicator

More info on the sample project.

Contribute

New features, bug fixes and improvements are welcome! For questions and suggestions use the issues.

Become a Patron! Donate

Star History

Star History Chart

License

The MIT License (MIT)

Copyright (c) 2017 Douglas Nassif Roma Junior

See the full license file.

More Repositories

1

react-native-keyboard-manager

⚛ Library to prevent issues of keyboard sliding up and cover inputs on React-Native iOS projects.
Objective-C
913
star
2

android-simple-tooltip

A simple library based on PopupWindow to create Tooltips on Android. 💚
Java
765
star
3

AndroidBluetoothLibrary

A Library for easy implementation of Serial Bluetooth Classic and Low Energy on Android. 💙
Java
212
star
4

react-native-get-location

⚛ Simple to use React Native library to get native device location for Android and iOS.
Java
178
star
5

react-native-recaptcha-that-works

⚛ A reCAPTCHA bridge for React Native that works (Android and iOS)
TypeScript
155
star
6

emage

🧙‍♂️ From developers to developers: a cross-platform tool for losslessly image compression.
JavaScript
119
star
7

react-native-pdf-renderer

⚛ A zoomable, blazing fast, zero dependencies, pure native, typed PDF Renderer for Android and iOS.
Java
106
star
8

react-native-easybluetooth-classic

⚛ A Library for easy implementation of Serial Bluetooth Classic on React Native (Android Only).
Java
43
star
9

react-native-gradient-shimmer

⚛ A pure JavaScript, performant, typed shimmer component for Android, iOS and Web
TypeScript
37
star
10

electron-webpack-react-boilerplate

Sample project containing Electron Forge + webpack + React + React Router + Ant Design + Recharts + Sass and Less.
JavaScript
26
star
11

react-native-notifree

*DEPRECATED* Free React Native library to display local notifications.
JavaScript
23
star
12

react-native-easybluetooth-le

A Library for easy implementation of Serial Bluetooth Low Energy on React Native. ⚛
Java
18
star
13

react-recaptcha-that-works

⚛ A reCAPTCHA bridge for React that works.
TypeScript
16
star
14

DouglasJuniorTCC

Software para mineração e medição de dados do GitHub.
Java
10
star
15

LaTeX-PPGI-UTFPR

Template LaTeX para criação do PDM/Dissertação de acordo com as normas da UTFPR
TeX
10
star
16

Facebug

Rede social em desenvolvimento pelos alunos de Programação Web 2015/1 do curso de ADS da Faculdade Integrado
Java
9
star
17

learning-react

JavaScript
7
star
18

WebDevAlfa-2018-React

Desenvolvimento Web com React JS
JavaScript
7
star
19

WebDevAlfa-2017-2-PrimeiroProjeto

Projeto "Hello World" utilizado como introdução ao framework React Native na Pós-graduação WebDev Alfa.
JavaScript
6
star
20

Treinamento-JavaScript-UTFPR

Conteúdo do treinamento de JavaScript ministrado na UTFPR-CM.
JavaScript
6
star
21

Bootcamp-DB1-2024

JavaScript
6
star
22

RhinoAndroidTest

JavaScript interpretation with Rhino
Java
5
star
23

simple-csv-editor

Simples editor de CSV para auxiliar no setup de máquinas pick and place.
Java
4
star
24

react-native-inputAccessoryView

Project to simulate the inputAccessoryView problem
Objective-C
4
star
25

SampleLibGDX

Sample project for learn libGDX on Android Studio
Java
4
star
26

conccepar-caprover-workshop

Minicurso: Como instalar e configurar um PaaS em minutos!
4
star
27

ignore-dependency-scripts

Script to prevent dependencies to execute post/pre install scripts when installed directly from git.
JavaScript
4
star
28

programacao-web-2018-2

Repositório para os arquivos das aulas de Programação Web.
Java
4
star
29

WebDevAlfa-2017-2-Avaliacao

Avaliação da disciplina de Desenvolvimento de Aplicações Híbridas.
Objective-C
4
star
30

WebDevAlfa-2019-Node

Desenvolvimento de APIs com Node JS
JavaScript
4
star
31

JavaBlockProgramming

A prototype for control the "execution flow" of the block programming.
Java
3
star
32

MinicursoLibGDX-VIICONCCEPAR2016

Projetos utilizados durante o Minicurso sobre LibGDX do VII CONCCEPAR da Faculdade Integrado de Campo Mourão - PR http://conccepar.grupointegrado.br/
Java
3
star
33

react-native-easybluetooth-core

This repository has the CoreModule class used in the libraries react-native-easybluetooth-le and react-native-easybluetooth-classic
Java
3
star
34

nodejs-babel-vscode-debug

Example project to use NodeJS 6 with babel and vscode debug.
JavaScript
3
star
35

java-basic-http_PI4_2016-2

Atividade de implementação de um Servidor HTTP Java para Projeto Integrador IV (2016/2)
Java
3
star
36

meiodia

🕺🍻 Chaaaaaaaama!
JavaScript
3
star
37

Treinamento-JavaScript-Mactus

Material do treinamento de JavaScript para a empresa Mactus de Campo Mourão
JavaScript
3
star
38

TestSwiftRealmAlamofireObjectMapper

Testing Realm Database on iOS Swift project
Swift
3
star
39

WebDevAlfa-2018-Node

Desenvolvimento de APIs com Node JS
JavaScript
3
star
40

CloudTester

Biblioteca de teste e comparação entre APIs de acesso a nuvem.
Java
3
star
41

Treinamento-JavaScript-SkyPass

Material do treinamento de desenvolvimento Web e Mobile para a empresa SkyPass de Campo Mourão
3
star
42

php-legacy-code-example

CSS
3
star
43

MinicursoLibGDX-SNCT2016

Projetos utilizados durante o Minicurso sobre LibGDX do SNCT 2016 em Dois Vizinhos - PR http://semanact.mcti.gov.br/
Java
3
star
44

WebDevAlfa-2019-React

Desenvolvimento Web com React JS
JavaScript
3
star
45

fabric-icons

This repository is maintained to allow the import of Office Fabric Icons into the react-native-vector-icons
SCSS
3
star
46

SEINFO-2017-JavaScript

Projeto do minicurso de Desenvolvimento Full-stack com JavaScript da SEINFO 2017
JavaScript
3
star
47

react-native-applifecycle

⚛ Provides functionality to determine whether the app is in the foreground or background and notifies you when the state changes.
TypeScript
2
star
48

GalaxyAsteroidsGameJFX

A simple example of a game developed in JavaFX and Java 8
Java
2
star
49

libgdx-textarea-highlighting

Textarea with code highlighting for LibGDX
Java
2
star
50

PrimefacesChartZoomTest

JavaScript
2
star
51

learning-reactnative-redux

Learning Redux with React-Native
JavaScript
2
star
52

SpaceInvaders-LibGDX

Jogo desenvolvido com os alunos de Tópicos Especiais 2015-2 da Faculdade Integrado de Campo Mourão
Java
2
star
53

learning-angular2

JavaScript
2
star
54

douglasjunior

2
star
55

backend-bootcamp-db1-2023

JavaScript
2
star
56

CloudTesterWeb

Implementação da biblioteca CloudTester para comparação entre APIs de acesso a plataformas de nuvem.
Java
2
star
57

CodeProMetrcis2CSV

Simple program for converting CodePro output XML files to CSV
Java
2
star
58

MinicursoGit-IXCONCCEPAR

Projetos utilizados durante o Minicurso sobre Git e GitHub do IX CONCCEPAR do Centro Universitário Integrado de Campo Mourão - PR
2
star
59

Treinamento-WebMobile-ExpNordeste

Material do treinamento de desenvolvimento Web e Mobile para a empresa Expresso Nordeste de Campo Mourão
PHP
2
star
60

BichoVsCVSAnalY

Minerador de dados para unir as Issues coletadas pelo Bicho aos Scmlogs coletados pelo CVSAnalY
Java
2
star
61

FlappyBird-LibGDX

Jogo desenvolvido com os alunos de Tópicos Especiais 2015-2 da Faculdade Integrado de Campo Mourão
Java
2
star
62

ProjetoIntegrador2012

Projeto interdisciplinar do 5º período do curso de TSI da UTFPR de Campo Mourão.
PHP
2
star
63

SimulandoHerancaMultipla

Exemplo de simulação de herança múltipla de tipos e comportamentos utilizando o modificador "default" do Java 8.
Java
2
star
64

react-native-daylight-saving-date

Sample project to reproduce the issue: Parsing 'daylight saving date' returns wrong date and time on Android.
Objective-C
1
star
65

learning-webpack

JavaScript
1
star
66

MinicursoRest-VICONCCEPAR

Projetos utilizados durante o Minicurso sobre REST do VI CONCCEPAR da Faculdade Integrado de Campo Mourão - PR
Java
1
star
67

SampleTracker

Android sample tracker
Java
1
star
68

PayaraJCloudsTest

Test project to use JClouds with Payara.
HTML
1
star
69

CadastroPessoaServlet

Disciplina de Programação Web da Faculdade Integrado - Aplicação de cadastro de pessoas utilizando Servlets e cliente Android
Java
1
star
70

apache-jira-miner

Automatically exported from code.google.com/p/apache-jira-miner
Java
1
star
71

react-native-environment-sample

Java
1
star
72

TestingLibrarySample

Java
1
star
73

Picaretas

Rede de anúncios em desenvolvimento pelos alunos de Programação Web 2015/2 do curso de ADS da Faculdade Integrado
Java
1
star
74

ExerciciosPOO-PPGI

Java
1
star
75

react-native-windows-test

C#
1
star
76

aula-revisao-de-codigo

Repositório para exemplificar o processo de revisão de código fonte.
1
star
77

CadastroProdutoServletBD

Disciplina de Programação Web da Faculdade Integrado - Aplicação de cadastro de produtos utilizando Servlets e MySQL
Java
1
star
78

micro-react-app-example

JavaScript
1
star
79

eslint-config-example-super-app

JavaScript
1
star
80

TestTomEE

Projeto de teste utilizando JSF, EJB, CDI, JPA e JAX-RS com TomEE Plume.
Java
1
star
81

learning-or-tools

Sample project to learn about Google OR Tools
Python
1
star
82

JavaScriptingTest

Java
1
star
83

node-app-with-docker

JavaScript
1
star
84

topicos-2017-2-frontend

JavaScript
1
star
85

Minicurso-Integrado-2017-JavaScript

Projeto do minicurso de Desenvolvimento Mobile e Backend com JavaScript da Faculdade Integrado.
JavaScript
1
star
86

Labirinto-LibGDX

Exemplo de criação de labirinto utilizando o conceito de matriz com LibGDX
Java
1
star
87

dispositivos-2018-1-introducao-android

Kotlin
1
star
88

mocha-test

JavaScript
1
star
89

topicos-2017-2-backend

Repositório contendo código Node JS.
JavaScript
1
star
90

dispositivos-2018-01-exemplo-kotlin

Exemplo de projeto Android utilizando Kotlin
Kotlin
1
star
91

repositorio-teste

HTML
1
star
92

db1-code-challange-2019

JavaScript
1
star
93

learning-nextjs

JavaScript
1
star
94

SimuladorJogoDaVida

Atividade para a disciplina de Programação Orientada a Objetos - PPGI - UTFPR-CP
Java
1
star
95

react-native-modules-test

Hello World for native modules in React Native projects.
Objective-C
1
star
96

qualidade-2017-2-bowling-game-kata

Java
1
star
97

SparkJavaTest

Project to test Spark Java Framework
Java
1
star
98

MultiOSEngineTest

Project to test the Intel Multi OS Engine
Java
1
star
99

learning-slim-twig

PHP
1
star
100

Minicurso-ProjetoWeb

HTML
1
star