Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
React Hook Form | 34,099 | 127 | 1,337 | a day ago | 951 | September 23, 2022 | 9 | mit | TypeScript | |
📋 React Hooks for form state management and validation (Web + React Native) | ||||||||||
Redux Form | 12,614 | 11,781 | 1,243 | 4 days ago | 235 | November 17, 2021 | 491 | mit | JavaScript | |
A Higher Order Component using react-redux to keep form state in a Redux store | ||||||||||
Eureka | 11,588 | 490 | 14 days ago | 27 | September 15, 2020 | 170 | mit | Swift | ||
Elegant iOS form builder in Swift | ||||||||||
Vee Validate | 9,634 | 2,190 | 735 | 5 days ago | 282 | September 19, 2022 | 48 | mit | TypeScript | |
✅ Painless Vue forms | ||||||||||
Formily | 9,334 | 119 | 11 days ago | 209 | September 20, 2022 | 11 | mit | TypeScript | ||
📱🚀 🧩 Cross Device & High Performance Normal Form/Dynamic(JSON Schema) Form/Form Builder -- Support React/React Native/Vue 2/Vue 3 | ||||||||||
Parsley.js | 9,045 | 329 | 41 | 6 months ago | 47 | December 10, 2019 | 69 | mit | JavaScript | |
Validate your forms, frontend, without writing a single line of javascript | ||||||||||
React Final Form | 7,217 | 500 | 384 | a month ago | 76 | April 01, 2022 | 385 | mit | JavaScript | |
🏁 High performance subscription-based form state management for React | ||||||||||
Tcomb Form Native | 3,162 | 499 | 18 | 7 months ago | 53 | October 11, 2018 | 128 | mit | JavaScript | |
Forms library for react-native | ||||||||||
Formkit | 2,633 | 13 | 2 days ago | 144 | September 23, 2022 | 51 | mit | TypeScript | ||
Vue Forms ⚡️ Supercharged | ||||||||||
Formsy React | 2,599 | 2 | 2 years ago | 1 | November 27, 2015 | 149 | mit | JavaScript | ||
A form input builder and validator for React JS |
A no-fuss Svelte form component that just works.
Try it out on the Svelte REPL!
Simply bind to the components values property:
Using built-in HTML input elements:
<script>
import Form from "@svelteschool/svelte-forms";
let values;
</script>
<Form bind:values>
<input
placeholder="Enter first name..."
type="text"
name="firstName" />
<input
placeholder="Enter last name..."
type="text"
name="lastName" />
</Form>
Here's how the values object would be structured in the above case:
{
firstName: 'Svelte',
lastName: 'School'
}
Inputs that do not have a name
property or are disabled
will not show up in the object.
File inputs are not supported.
prop name | type | default |
---|---|---|
actions |
[[action, actionProp]] |
[] |
actions
The actions prop takes an array of [action, options]. The action
is applied to the form element using the options
just like it would be if you manually applied it to an element: use:action={options}
.
Handling form validation is pretty straight forward in Svelte using this library, you'd pick your preferred validation library (Yup for example) and just do a reactive statement like so: $: validity = validateForm(values) where validateForm is a function that does just that.
Simple. Install it using yarn
or npm
.
yarn add @svelteschool/svelte-forms
npm install @svelteschool/svelte-forms
If you're using Sapper, make sure to install it as a dev dependency:
yarn add -D @svelteschool/svelte-forms
Run tests by running the test script:
yarn test
If you are interested in contributing you are welcome to open PRs. Please make sure all tests pass and if you add functionality, add your own tests.
This project is licensed under the MIT License - see the LICENSE.md file for details