Making SvelteKit validation and displaying of forms easier than ever!
- Seamless merging of
ActionData - Forget about which one to use and how, just focus on your data.
- Server- and client-side data validation using Zod, with output that can be used directly on the client.
- Auto-centering and auto-focusing on invalid form fields.
- Tainted form detection, prevents the user from losing data if navigating away from an unsaved form.
- No JS required as default, but full support for progressive enhancement.
- Automatically coerces the string data from
FormData into correct types.
- For advanced data structures, forget about the limitations of
FormData - Send your forms as devalued JSON, transparently.
- Generates default form values from validation schemas.
- Support for nested data structures, snapshots and multiple forms on the same page.
- Works both on the server and with single-page applications (SPA)!
- Proxy objects for handling data conversions to string and back again.
- Realtime client-side validators for immediate user feedback.
- Provide submit state feedback with three auto-updating timers, based on human perception research.
- Even more care for the user: No form data loss, by preventing error page rendering as default.
- Hook into a number of events for full control over the validation data and the
ActionResult, with a possibility to cancel the update at every step.
- Complete customization with a huge list of options.
- Comes with a Super Debugging Svelte Component: SuperDebug.
npm i -D sveltekit-superforms zod
pnpm i -D sveltekit-superforms zod
Follow the get started tutorial on the website to get a hands-on introduction to Superforms: https://superforms.rocks/get-started
You can also watch this excellent introduction video to see what's possible: https://www.youtube.com/watch?v=MiKzH3kcVfs
Ideas, general feedback, bug reports, PR:s, etc, are very welcome as a Github issue discussion, or on the Discord server!
Now that version 1.0 is released, there will be bug fixes, more support questions on the Discord server, future features to work on, and so on.
If you're using Superforms in non-profit circumstances, the library is completely free, a star on Github is more than enough if you want to give your support. But if you are using Superforms in a commercial project, would you or the company you work for consider donating?
If you have appreciated my support on Discord and Github, or want to ensure that things keep rolling, please support open source software in this way.