Svelte Common Hooks

Common Hooks for Svelte

A collection of reusable custom hooks that simplify common patterns in Svelte applications. Build faster with pre-built utilities for data tables, form state management, and modal controls.

Powerful Utilities

Three essential hooks to accelerate your Svelte development

createDataTable

Complete data table solution with built-in pagination, sorting, filtering, and loading states. Perfect for displaying large datasets with minimal setup.

  • Bring your own function to define search, filter and sort
  • Automatic pagination
  • Column sorting
  • Search & filtering
  • Loading states
  • Data processing can be done in client, server or even manually define your logic

createFormState

Robust form state management with Zod schema validation. Handle form data, validation errors, and submission states effortlessly.

  • Zod schema validation
  • Real-time error handling
  • Submission states
  • Type-safe forms

createModalState

Smart modal state management that automatically handles browser navigation. Modals close when users navigate back, providing intuitive UX.

  • Callback on changing state
  • Navigation-aware