A Prompt component is useful when you need to ask for some quick information from a user.


import React from 'react'
import styles from './styles'
import {View, Text, Alert} from 'react-native'
import Button from '../../button'
import prompt from '../index'

var view = function () {
    return (
        <View style={[styles.container]}>
            <View style={[styles.section]}>
                    onClick={async () => {
                        let value = await prompt('Your information', 'Please enter your info')
                    text={'Show Prompt'}
module.exports = view


Supported properties

prompt(title, message, callbackOrActions, type?, defaultValue?) {#Modal.prompt(title,-message,-callbackOrActions,-type?,-defaultValue?)}

Properties Descrition Type Default
title title of the prompt modal string or React.Element -
message message string or React.Elemen -
callbackOrActions button group {text, onPress} or callback Array or Function -
type prompt style String ( default , secure-text , login-password ) default

Published On October 14, 2020 5:57 PM

Last Updated October 14, 2020 5:57 PM