SimpleForm

The simple form component is derived from the Form component, and it do not uses the hook.

Preview

Usage

npm i react-hartan

Customization With Props

  • 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.

  • action -> Accepts a URL string for the action attribute of the form tag, sent by user.

  • method -> Specifies the default method as POST in the method attribute of form tag.

  • 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.

Component Code

This is the code for Simple Form component.

Last updated