Top Quality Products

React native contact form with cropper

$9.00

Added to wishlistRemoved from wishlist 0
Add to compare

12 sales

LIVE PREVIEW

React native contact form with cropper

Review: React Native Contact Form with Cropper

I recently had the opportunity to work with the React Native Contact Form with Cropper app, and I must say that it’s an impressive piece of work. The app is designed to allow users to upload their profile picture with a selected size and fill out a contact form, which can then be sent to a server. The app is built using React Native, a popular framework for building cross-platform mobile apps.

Advantages

One of the biggest advantages of this app is its ability to be built with a single codebase that can run on both Android and iOS devices. This means that developers can save time and resources by not having to create separate apps for each platform. Additionally, the app is 100% compatible with both iPhone and Android devices, making it a great choice for developers who want to reach a wide audience.

The app also comes with a range of features that make it easy to use and customize. These include a splash screen, bottom menu, contact form, profile picture upload, profile picture cropper with selected area, and an attractive grid view. The app also includes One Signal integration, which allows developers to send push notifications to users.

What You’ll Get

When you purchase this app, you’ll get a React Native app that includes the basic functionality of uploading a profile picture with a selected size and filling out a contact form. The app also includes a splash screen with a logo, which is a nice touch. The app is designed to be easy to use, with a simple and intuitive interface that makes it easy for users to upload their profile picture and fill out the contact form.

Requirements

Before you can use this app, you’ll need to have some knowledge of React Native and mobile technologies such as JavaScript, Android Studio, and Xcode. You’ll also need to be able to install React Native and its dependencies on your machine. The app includes an API file that you’ll need to put on your server in order to fetch the posted data from the mobile app.

Customer Support

The developer of this app offers excellent customer support, with 24/7 support available to answer any questions you may have. The developer also offers reskin and upload to the Play/App store services for an additional $50, as well as free lifetime updates.

Score

I would give this app a score of 5 out of 5 stars. The app is well-designed, easy to use, and includes a range of features that make it a great choice for developers who want to build a contact form with a profile picture upload. The developer’s customer support is also top-notch, making it easy to get help if you need it.

Overall, I would highly recommend this app to anyone who is looking to build a contact form with a profile picture upload. It’s a great choice for developers who want to build a cross-platform app that is easy to use and customize.

User Reviews

0.0 out of 5
0
0
0
0
0
Write a review

There are no reviews yet.

Be the first to review “React native contact form with cropper”

Your email address will not be published. Required fields are marked *

Introduction

React Native is a popular framework for building native mobile applications using JavaScript and React. One of the most common requirements in any mobile application is to capture user input and send it to a server for processing. A contact form is a great way to collect user information such as name, email, and phone number. In this tutorial, we will learn how to build a contact form with a cropper in a React Native application.

A cropper is a powerful tool that allows users to crop and resize images. In our contact form, we will use a cropper to allow users to upload a profile picture or logo. We will be using the React Native Camera Roll library to handle the image selection and cropping.

Setting up the Project

To get started, create a new React Native project by running the following command:

npx react-native init ContactFormWithCropper

Next, navigate to the project directory and install the required dependencies:

cd ContactFormWithCropper
npm install react-native-camera-roll

Creating the Contact Form Component

Create a new file called ContactForm.js and add the following code:

import React, { useState } from 'react';
import { View, Text, TextInput, Button } from 'react-native';
import { CameraRoll } from 'react-native-camera-roll';

const ContactForm = () => {
  const [name, setName] = useState('');
  const [email, setEmail] = useState('');
  const [phone, setPhone] = useState('');
  const [image, setImage] = useState(null);

  const handleNameChange = (text) => {
    setName(text);
  };

  const handleEmailChange = (text) => {
    setEmail(text);
  };

  const handlePhoneChange = (text) => {
    setPhone(text);
  };

  const handleImageChange = (image) => {
    setImage(image);
  };

  const handleSubmit = () => {
    // Send the form data to the server
  };

  return (
    <View>
      <Text>Name:</Text>
      <TextInput
        value={name}
        onChangeText={(text) => handleNameChange(text)}
        placeholder="Enter your name"
      />
      <Text>Email:</Text>
      <TextInput
        value={email}
        onChangeText={(text) => handleEmailChange(text)}
        placeholder="Enter your email"
        keyboardType="email-address"
      />
      <Text>Phone:</Text>
      <TextInput
        value={phone}
        onChangeText={(text) => handlePhoneChange(text)}
        placeholder="Enter your phone number"
        keyboardType="phone-pad"
      />
      <Text>Profile Picture:</Text>
      <CameraRoll
        onSelection={(image) => handleImageChange(image)}
        types={['photo']}
      />
      {image && (
        <View>
          <Text>Cropped Image:</Text>
          <Image source={{ uri: image.uri }} resizeMode="cover" />
        </View>
      )}
      <Button title="Submit" onPress={handleSubmit} />
    </View>
  );
};

export default ContactForm;

In this component, we are using the useState hook to store the user input in the name, email, and phone state variables. We are also using the useState hook to store the selected image in the image state variable.

We are using the CameraRoll component from the React Native Camera Roll library to allow users to select an image from their device's camera roll. When an image is selected, we are updating the image state variable and displaying the cropped image using the Image component.

Implementing the Cropper

To implement the cropper, we need to add the React Native Cropper library to our project. Run the following command:

npm install react-native-cropper

Next, add the following code to the ContactForm.js file:

import React, { useState } from 'react';
import { View, Text, TextInput, Button } from 'react-native';
import { CameraRoll } from 'react-native-camera-roll';
import { Cropper } from 'react-native-cropper';

const ContactForm = () => {
  //...

  const handleImageChange = (image) => {
    setImage(image);
  };

  const handleCrop = (cropData) => {
    const croppedImage = { uri: `data:${cropData.mime};base64,${cropData.data}` };
    setImage(croppedImage);
  };

  return (
    //...
    <CameraRoll
      onSelection={(image) => handleImageChange(image)}
      types={['photo']}
    >
      {image && (
        <View>
          <Text>Cropped Image:</Text>
          <Cropper
            source={{ uri: image.uri }}
            aspect={1 / 1}
            aspectType="fixed"
            cropperViewStyle={{
              borderColor: 'red',
              borderWidth: 1,
            }}
            style={{ width: 300, height: 300 }}
            onCrop={handleCrop}
          />
        </View>
      )}
    </CameraRoll>
  );
};

In this code, we are using the Cropper component from the React Native Cropper library to crop the selected image. We are setting the source property to the selected image and the aspect property to 1:1. We are also adding some styles to the cropper view.

When the user crops the image, we are calling the handleCrop function with the cropped image data. We are then updating the image state variable with the cropped image.

Conclusion

In this tutorial, we have learned how to build a contact form with a cropper in a React Native application. We have used the React Native Camera Roll library to allow users to select an image from their device's camera roll and the React Native Cropper library to crop the selected image.

You can customize the appearance and behavior of the contact form and cropper by using various props and styles available in the React Native Cropper library.

I hope this tutorial has been helpful in getting you started with building a contact form with a cropper in your React Native application. Happy coding!

Here is an example of how to configure a React Native contact form with cropper:

Form Settings

formSettings: {
  title: 'Contact Us',
  name: 'contact',
  fields: [
    {
      key: 'name',
      type: 'text',
      label: 'Name',
      required: true,
    },
    {
      key: 'email',
      type: 'email',
      label: 'Email',
      required: true,
    },
    {
      key: 'phone',
      type: 'phone',
      label: 'Phone',
    },
    {
      key: 'message',
      type: 'textarea',
      label: 'Message',
      required: true,
    },
  ],
}

Crop Settings

cropSettings: {
  imageKey: 'profilePicture',
  aspectRatio: 1,
  width: 200,
  height: 200,
  resizeMode: 'contain',
  cropStyle: 'circle',
  cropperStyle: {
    container: {
      backgroundColor: 'rgba(0,0,0,0.5)',
    },
    image: {
      borderRadius: 100,
    },
  },
}

Api Settings

apiSettings: {
  apiUrl: 'https://your-api-url.com/api/contacts',
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: {
    name: '{name}',
    email: '{email}',
    phone: '{phone}',
    message: '{message}',
    profilePicture: '{profilePicture}',
  },
}

Storage Settings

storageSettings: {
  storageEngine: 'asyncStorage',
  key: 'contacts',
}

Miscellaneous Settings

miscSettings: {
  submitButtonLabel: 'Send',
  cancelButtonLabel: 'Cancel',
  successMessage: 'Your message has been sent successfully!',
  errorMessage: 'An error occurred while sending your message.',
}

Here are the features of this React Native contact form with cropper:

  1. Android and iOS single code: The app has a single codebase that runs on both Android and iOS devices.
  2. 100% iPhone and Android compatible: The app is fully compatible with all iPhone and Android devices.
  3. Splash Screen: The app has a nice splash screen with a logo that appears when the app is launched.
  4. Bottom menu: The app has a bottom menu that is compatible with both landscape and portrait modes.
  5. Contact form: The app includes a contact form that can be used to collect user information.
  6. Profile picture upload: The app allows users to upload a profile picture from their mobile gallery or take a new photo.
  7. Profile picture cropper with selected area: The app includes a profile picture cropper that allows users to select a specific area of the image to crop.
  8. Attractive Grid view: The app has an attractive grid view that displays the uploaded images.
  9. One signal included: The app includes One Signal, a push notification service.
  10. Material integration: The app integrates with the Material design framework.
  11. Clean code: The app has clean, well-organized code.
  12. Easily integrate to older app: The app can be easily integrated into an existing older app.

Additionally, the app includes the following features:

  • Ability to upload photos and send them to the server along with the contact form details.
  • API file provided for the server.
  • Option to run the app in simulator or on a physical device.
  • Support for React Native, JavaScript, Android Studio, and Xcode.
  • Free lifetime updates and excellent customer support.
  • Reskin and upload to the Play/App store available for an additional fee of $50.
React native contact form with cropper
React native contact form with cropper

$9.00

Shop.Vyeron.com
Logo
Compare items
  • Total (0)
Compare
0