1.0.10 • Published 11 months ago

formdash v1.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

FORMDASH

ContactForm React Component

A customizable and easy-to-use contact form component for React applications. This package provides a fully functional contact form with validation and Tailwind CSS styling.

Features

  • Customizable: Show or hide form fields (name, email, phone, message).
  • Validation: Simple validation for required fields and email format.
  • Tailwind CSS: Styled with Tailwind CSS for a clean and modern look.
  • Easy Integration: Simple integration with your React app.

Installation

To install the formdash package, use npm or yarn:

npm install formdash

or

yarn add formdash

Screenshots

Examples

Once installed, you can import and use the ContactForm component in your React application.

import { ContactForm } from 'formdash';

Here is an example of how to use the ContactForm component:

import { ContactForm } from 'formdash';

const App = () => {

  // Function to handle form data when the form is submitted
  const handleFormData = (data) => {

    console.log("Form Data Received:", data);
    // Process or display the data as needed

  };

  return (
    <div>
      <h1>Contact Us</h1>
      <ContactForm
        onSubmit={handleFormData}
      />
    </div>
  );
};

export default App;

Props

Get all items

ParameterTypedefaultdescription
namebooleantruedefault true
phonebooleanfalsedefault false
emailbooleantruedefault true
messagebooleantruedefault true
onSubmitfunctionrequiredA callback function that will be called with the form data when the form is successfully submitted.
public_keystringnullYour API key
api_keystringnullYour API key

Summary

With these changes, the ContactForm component will accept publicKey and apiKey for authentication. Users of your package will need to provide these keys and handle the form data accordingly. The README.md will guide them on how to integrate and use the component in their projects.

Author

@rajib-sadhu

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

11 months ago

1.0.5

11 months ago

1.0.4

11 months ago

1.0.3

11 months ago

1.0.10

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago