Giter Club home page Giter Club logo

modular-forms's Introduction

Modular Forms

Modular Forms

Modular Forms is a JavaScript library that is build on top of SolidJS to validate and handle various types of forms. It is fast by default and the bundle size is small due to a modular design. Try it out on our website!

๐Ÿงช Features

  • Small bundle size starting at 2.5 KB
  • Modular design โ€“ only use what you need
  • It's fast โ€“ DOM updates are fine-grained
  • Readable API that is similar to SolidJS
  • Validate everything from emails to files
  • No dependencies โ€“ except for SolidJS
  • Excellent editor support through TypeScript
  • Supports all native HTML form fields

๐Ÿ’ฅ Motivation

Since you're using SolidJS, I assume native performance, granular reactivity, and a small bundle size is important to you. Why should that not also count for your form library? Is there really a need to opt-in to a big and slow form library to meet all your needs?

I said no, and undertook an attempt to develop a modular form library that is as powerful as big libraries like Formik, React Hook Form and Felte, that is fast by default and takes only 2.5 KB (minified + gzipped) for a small and uncomplicated login form or up to 5 KB (minified + gzipped) for a complex and dynamic form. The result of this journey is this library called Modular Forms!

Since the library itself is modular, the bundle size increases less than linear as more functionality is used. Basic functionality starts at 2.5 KB (minified + gzipped) and the most complex form you can create requires about 5 KB (minified + gzipped).

I've started implementing it with SolidJS, but I'm sure the API could also work in a similar way for React, Vue and Svelte. So if you are interested and able to support it, let me know.

โœ๏ธ Feedback

Find a bug or have an idea how to improve the library? Please fill out an issue. Together we can make the library even better!

๐Ÿ™Œ๐Ÿผ Credits

When creating Modular Forms, I took inspiration from React Hook Form and Formik. I also want to thank Ryan Carniato for his inspiring streams with exclusive and deep insights into different technologies and David Di Biase for his help via Discord.

๐Ÿ”‘ License

This project is licensed under the MIT License.

modular-forms's People

Contributors

fabian-hiller avatar iainsimmons avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.