Form
A Form is mainly used to collect user data. Each form is made up of form components. These are sections that allow you to add information to the to the form using multiple input field types.
Last updated
A Form is mainly used to collect user data. Each form is made up of form components. These are sections that allow you to add information to the to the form using multiple input field types.
Last updated
fields
-> Required to be sent by the user, accepts an object, of the following structure:
NOTE: Keep the name of the keys same as above.
formTitle
-> Accepts a string value, used as the form heading.
updateData
-> Accepts a function provided by the useForm hook but it should be passed down from the user for updating form fields.
submit
-> Accepts a function provided by the useForm hook but it should be passed down from the user for submitting the form data.
submitted
-> Accepts a state value provided by the useForm hook but it should be passed down from the user to show the submitted animation.
id
-> The id prop is similar to the id attribute in HTML. It allows to provide overall component id.
userFormCardStyle
-> Accepts class name(s) as string, custom styling prop for the fullthe full form card container.
userTitleStyle
-> Accepts class name(s) as string, custom styling prop for the heading of the form inside form card.
userFormStyle
-> Accepts class name(s) as string, custom styling prop for the form container inside form card.
userInputFieldStyle
-> Accepts class name(s) as string, custom styling prop for the input fields container.
userSubmittedStyle
-> Accepts class name(s) as string, custom styling prop for the submitted container.
userSubmittedSVGStyle
-> Accepts class name(s) as string, custom styling prop for the submitted svg.
This is the code for Form component.