React Mobile Inputs
React Mobile Inputs - Bootstrap 4 & Material Design
React Mobile input is a special field which is used in order to receive data from the user. Used mostly in a variety of web-based forms.
Basic examples
Android
iOS
<script>
import React, { Component } from "react";
import {View, ScrollView } from "react-native";
import { MDBInput } from 'mdbreact-mobile';
export default class InputPage extends Component {
render() {
return (
<ScrollView>
<View>
<MDBInput label="Basic"></MDBInput>
</View>
</ScrollView>
);
}
}
</script>
Error message
Android
iOS
<script>
import React, { Component } from "react";
import {View, ScrollView } from "react-native";
import { MDBInput } from 'mdbreact-mobile';
export default class InputPage extends Component {
render() {
return (
<ScrollView>
<View>
<MDBInput label="With error" errorMessage="Error message"></MDBInput>
</View>
</ScrollView>
);
}
}
</script>
Inputs - API
In this section you will find advanced information about the Inputs component. You will find out which modules are required, what are the possibilities of configuring the component, and what events and methods you can use in working with it.
Import statement
import { MDBInput } from 'mdbreact-mobile'
API Reference: Properties
Name | Type | Default | Description | Example |
---|---|---|---|---|
title |
string | '' |
Button default text | <MDBBtn title="Text" /> |
API Reference: Methods
Name | Parameters | Description | Example |
---|---|---|---|
onBlur |
()=>{} | Listener for blur event. | <MDBModal onBlur="()=>{}" /> |
onFocus |
()=>{} | Listener for focus event. | <MDBModal onFocus="()=>{}" /> |