1.1.0 • Published 2 years ago

react-native-input-sheet v1.1.0

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

react-native-input-sheet Monthly download Total downloads

Install

npm install react-native-input-sheet --save

Example

example

Usage

import InputSheet, {InputSheetRef} from 'react-native-input-sheet';

const Example = () => {
    const inputSheetRef = useRef<InputSheetRef>(null);

    const showInputSheet = useCallback(() => {
        inputSheetRef.current?.show();
    }, []);
    return (
        <>
            <Button onPress={showInputSheet}>Press me</Button>
            <InputSheet ref={inputSheetRef} onSubmit={console.log} />
        </>
    )
}

Properties

PropDefaultRequiredDescription
defaultValuefalsenothe default value of textInput
requiredtruenoWhether the text input value is required
placeholder''noThe placeholder of the textInput
onSubmit(text) => {}noFunction that is called when user submits it
buttonText'submit'noThe string that is displayed on the submit button
maskStyle-noThe style of the masker( )
style-noThe style of the container( )
inputStyle-noThe style of the textInput( )
buttonTextStyle-noThe style of the submit button text( )
autoClearTexttruenoWhether textInput needs be clear after onSubmit finished
inputPropsundefinedn oThe props of textInput
keyboardVerticalOffset10 2noThe keyboardVerticalOffset of KeyboardAvoidingView
1.1.0

2 years ago

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