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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-forms-validations

v0.1.0

Published

React forms repository around formik and you with layouts and themes

Downloads

9

Readme

react-forms

Image of Horizantal Layout

React Forms is a wrapper library around React Formik library and Yup validator with custom Form and Field implementation. The purpose of this library to provide additional support for:

  1. Layouts - Veritical and Horizantal

  2. Themes - Default comes with two themes

  3. Form handlers Handlers to provide form customization with methods like,

    • onInitializing - Fires when Form is getting initilised
    • onReady - Fires when React Form DOM is ready
    • onSubmitting - Fires before submitting form
  4. Form Field Handler Handlers to provide form field customization with methods like,

    • getValues - Fires when Form Field is getting initilised
    • setValues - Fires when onBlur event of Field

Form Section

Form Section is a powerful div container to create flexible, customizable layouts created using Css Flex. It is specifically desgined to create complex and nested UI layouts.

Configuration

  • layout - string, Default: FormSectionLayoutType.Vertical, Values: [FormSectionLayoutType.Vertical, FormSectionLayoutType.Horizantal]
  • theme - string, Default: FormSectionTheme.Default, Values: [FormSectionTheme.Default, FormSectionTheme.White]
  • numberOfRowFields - number, Default: 2, Values: [2,3,6], Specify number of form fields needs to show on horizantal layout
  • autoSpacing - boolean, Default: false, Specify if want to have auto spacing between child elements, e.g. often we need auto spacing between button or sections
  • align - string, Default: None, Values: [FormSectionAlignment.Left, FormSectionAlignment.Right]
  • width - string, Default: auto
  • cssClasses - string, Default: None, Specify custom css classes
  • style - string, Default: None, Specify custom style

Form Query Parameter handler

This handler updates query string parameter on submit and update form values from query parameter values.

Configuration

  • queryParams - object, Form property name
  • fields - Array, field names
  • allFields - boolean, Default: false, Use if want to update use all fields
  • urlUpdate - boolean, Default: true, Update Query Url
  • autoSubmit - boolean, Default: false, Set true if want to Submit form On Form initilise

Form Field Cache handler

This handler caches form field values in local storage. Configuration

  • cache - object, Form Field property name
  • provider - string, Default: 'LocalStorage', provider name
  • max - number, Default: 10, Specify how many field values to cache

Horizantal Layout

Image of Horizantal Layout

Configuration

  • layout - string, Default: FormSectionLayoutType.Horizontal, Form layout property name
  • numberOfRowFields - number, Default: 2, Values: [2,3,6], Specify number of form fields needs to show on horizantal layout

Themes

Configuration

  • default

Image of Horizantal Layout

  • white

Image of Horizantal Layout