npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

enquiry-form-v1

v1.0.120

Published

This package exports two main components: RightSection and EnquiryForm. Below are their schemas and how to use them.

Readme

This package exports two main components: RightSection and EnquiryForm. Below are their schemas and how to use them.

Installation

npm install my-npm-package

Usage

RightSection

The RightSection component is used to render a section with dynamic form fields. Below is the schema for its propTypes:

RightSection.propTypes = { formData: PropTypes.arrayOf(PropTypes.shape({ title: PropTypes.string, componentType: PropTypes.string.isRequired, subtitle: PropTypes.string, countryCode: PropTypes.string, endPoint: PropTypes.shape({ url: PropTypes.string.isRequired, method: PropTypes.string.isRequired, }), fields: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string.isRequired, displayName: PropTypes.string.isRequired, placeholder: PropTypes.string, type: PropTypes.string.isRequired, validation: PropTypes.object, value: PropTypes.string, options: PropTypes.arrayOf(PropTypes.object), endPoint: PropTypes.shape({url: PropTypes.string, method: PropTypes.string}), })).isRequired, subSection: PropTypes.shape({ componentType: PropTypes.string.isRequired, submitButtonText: PropTypes.string, events: PropTypes.shape({ onChangeEvent: PropTypes.string, onBlur: PropTypes.string, }), resendEndpoint: PropTypes.shape({ url: PropTypes.string.isRequired, method: PropTypes.string.isRequired, }), endPoint: PropTypes.shape({ url: PropTypes.string.isRequired, method: PropTypes.string.isRequired, }), }), submitButtonText: PropTypes.string, })), extraFields: PropTypes.arrayOf(PropTypes.string), externalLink: PropTypes.shape({ privacypolicy: PropTypes.string, termscondition: PropTypes.string, }), trackEvent: PropTypes.func, otpSuccessCallback: PropTypes.func, successCallback: PropTypes.func, utmfields: PropTypes.object, };

Example Usage

import { RightSection } from 'my-npm-package';

const formData = [ { title: "User Information", componentType: "form", subtitle: "Please fill out your details", countryCode: "US", endPoint: { url: "/submit", method: "POST" }, fields: [ { name: "firstName", displayName: "First Name", placeholder: "John", type: "text", validation: { required: true }, value: "", options: [] }, { name: "lastName", displayName: "Last Name", placeholder: "Doe", type: "text", validation: { required: true }, value: "", options: [] } ], submitButtonText: "Submit", }, ];

const MyComponent = () => ( );

EnquiryForm The EnquiryForm component is used to render an enquiry form with a banner. Below is the schema for its propTypes:

EnquiryForm.propTypes = { bannerProps: PropTypes.shape({ bannerTitle: PropTypes.string, listBannerItems: PropTypes.arrayOf(PropTypes.string), bannerImage: PropTypes.string, }), formData: PropTypes.arrayOf(PropTypes.shape({ title: PropTypes.string, componentType: PropTypes.string.isRequired, subtitle: PropTypes.string, countryCode: PropTypes.string, endPoint: PropTypes.shape({ url: PropTypes.string.isRequired, method: PropTypes.string.isRequired, }), fields: PropTypes.arrayOf(PropTypes.shape({ name: PropTypes.string.isRequired, displayName: PropTypes.string.isRequired, placeholder: PropTypes.string, type: PropTypes.string.isRequired, validation: PropTypes.object, value: PropTypes.string, options: PropTypes.arrayOf(PropTypes.object), endPoint: PropTypes.shape({url: PropTypes.string, method: PropTypes.string}), })).isRequired, subSection: PropTypes.shape({ componentType: PropTypes.string.isRequired, submitButtonText: PropTypes.string, events: PropTypes.shape({ onChangeEvent: PropTypes.string, onBlur: PropTypes.string, }), resendEndpoint: PropTypes.shape({ url: PropTypes.string.isRequired, method: PropTypes.string.isRequired, }), endPoint: PropTypes.shape({ url: PropTypes.string.isRequired, method: PropTypes.string.isRequired, }), }), submitButtonText: PropTypes.string, })), extraFields: PropTypes.arrayOf(PropTypes.string), externalLink: PropTypes.shape({ privacypolicy: PropTypes.string, termscondition: PropTypes.string, }), trackEvent: PropTypes.func, otpSuccessCallback: PropTypes.func, successCallback: PropTypes.func, utmfields: PropTypes.object, };

Example Usage

import { EnquiryForm } from 'my-npm-package';

const bannerProps = { bannerTitle: "Contact Us", listBannerItems: ["24/7 Support", "Free Consultation"], bannerImage: "/path/to/image.jpg", };

const formData = [ { title: "Contact Details", componentType: "form", subtitle: "We would love to hear from you", countryCode: "US", endPoint: { url: "/contact", method: "POST" }, fields: [ { name: "email", displayName: "Email Address", placeholder: "[email protected]", type: "email", validation: { required: true }, value: "", options: [] }, { name: "message", displayName: "Message", placeholder: "Your message", type: "textarea", validation: { required: true }, value: "", options: [] } ], submitButtonText: "Send", }, ];

const MyEnquiryComponent = () => ( ); Props Overview Both RightSection and EnquiryForm have the following props structure:

formData: Array of objects representing the form sections and fields. title: String, title of the form section. componentType: String, type of the component, required. subtitle: String, subtitle of the form section. countryCode: String, country code for the form section. endPoint: Object with url and method for form submission. fields: Array of objects representing individual fields. name: String, name of the field, required. displayName: String, display name of the field, required. placeholder: String, placeholder text for the field. type: String, type of the field (e.g., text, email), required. validation: Object, validation rules for the field. value: String, default value of the field. options: Array of objects for select-type fields. endPoint: Object with url and method for dynamic field validation. subSection: Object representing a subsection within the form. componentType: String, type of the component, required. submitButtonText: String, text for the submit button. events: Object with event handlers (onChangeEvent, onBlur). resendEndpoint: Object with url and method for resending data. endPoint: Object with url and method for subsection submission. submitButtonText: String, text for the submit button. extraFields: Array of strings representing extra fields. externalLink: Object with privacypolicy and termscondition URLs. trackEvent: Function for tracking events. otpSuccessCallback: Function for OTP success callback. successCallback: Function for form submission success callback. utmfields: Object representing UTM fields.

For detailed usage and examples, please refer to the documentation or the example provided above.