felte
Felte is a form library designed for Svelte, Solid, and React, with experimental support for Vue and VanillaJS (via Web Components). It provides a simple way to handle forms without requiring complex components like Field
or Form
, instead using plain stores and actions.
Key Features:
- Framework Support: Primarily supports Svelte, Solid, and React, with additional packages for Vue and VanillaJS.
- Minimal Setup: Only requires the
name
attribute on HTML elements to make forms reactive. - Flexible Validation: Works with any validation library (e.g., Yup, Zod, Superstruct, Vest) or custom validation logic.
- Dynamic Forms: Handles addition/removal of form controls during runtime.
- Error Reporting: Offers official
reporter
packages for displaying validation errors. - High Test Coverage: Maintains 99% code coverage and robust testing.
- Extensible: Easily extendable with custom functionality.
Target Audience:
- Developers looking for a lightweight, framework-agnostic form solution.
- Teams using Svelte, Solid, or React who prefer a store-based approach over component-heavy libraries.
- Projects requiring dynamic forms or custom validation strategies.
Example Usage (Svelte):
<script>
import { createForm } from 'felte';
const { form } = createForm({
onSubmit: async (values) => { /* API call */ },
});
</script>
<form use:form>
<input type="text" name="email" />
<input type="password" name="password" />
<button type="submit">Sign In</button>
</form>
Packages:
- Core:
felte
(Svelte),@felte/solid
,@felte/react
,@felte/vue
,@felte/element
(VanillaJS). - Validators: Support for Yup , Zod , Superstruct , and [Vest](https://vest.ver
svelteformstypescriptsolidjsvalidationform-validationjavascriptreactform
Featured Stories
No featured articles here. Navigate to an article, then pick the Feature on menu button