Skip to content

Introduction

Welcome to svelte5-hook-form!

Handling forms, validating inputs, and managing submission states can quickly become the most complex part of any frontend application. svelte5-hook-form is designed to make this process completely painless by leveraging the full power of Svelte 5’s new reactivity system (Runes).

svelte5-hook-form is a lightweight, type-safe, and zero-dependency form management library built exclusively for Svelte 5. It takes inspiration from industry-standard patterns (like React Hook Form) but is heavily optimized for the Svelte compiler, allowing you to build complex forms with minimal boilerplate.

  • Svelte 5 Native: Built from the ground up using $state and $derived. We ditched the legacy store subscriptions for pure, high-performance reactivity.
  • End-to-End Type Safety: Written in TypeScript. It automatically infers your form schema, providing robust compile-time error checking and perfect autocomplete in your IDE.
  • Zero Dependencies: It does exactly what it needs to do without adding unnecessary bloat to your bundle size. Pure performance focused on core form logic.
  • Unopinionated UI: We manage the state and validation; you control the UI. It integrates seamlessly with any UI library or custom CSS you prefer.

Getting started is easy. Install the library using your favorite package manager:

Terminal window
# npm
npm install svelte5-hook-form
# pnpm
pnpm add svelte5-hook-form
# yarn
yarn add svelte5-hook-form
# bun
bun add svelte5-hook-form