Svelte Recaptcha V2

screenshot of Svelte Recaptcha V2
svelte

Google reCAPTCHA v2 implementation for Svelte SPA, SSR and sveltekit static sites.

Overview:

The svelte-recaptcha-v2 is a Google reCAPTCHA v2 implementation specifically designed for Svelte SPA, SSR, and SvelteKit static sites. It offers various features such as compatibility with Svelte's server-side rendering, easy integration with third-party form validation libraries, support for both invisible and checkbox reCAPTCHA, event model for intercepting different reCAPTCHA states, and more. The library provides proper DOM cleanup and includes TypeScript definitions for LSP.

Features:

  • Svelte Server Side Rendering (SSR) friendly
  • Works with SvelteKit SPA, SSR, and static site adapters
  • Easy integration with third-party form validation libraries
  • Fail-safe loader to inject reCAPTCHA
  • Invisible reCAPTCHA or checkbox reCAPTCHA support
  • Event model for intercepting various reCAPTCHA states
  • Handle all your form logic in a single submit handler
  • Proper DOM cleanup (deletes reCAPTCHA completely)
  • Documented, debug.js friendly source code
  • TypeScript definitions are included for LSP

Summary:

The svelte-recaptcha-v2 library provides a convenient way to implement Google reCAPTCHA v2 in Svelte applications. It offers compatibility with server-side rendering, SvelteKit, and static site adapters. The library has features like easy integration with third-party form validation libraries, support for invisible or checkbox reCAPTCHA, event model for intercepting reCAPTCHA states, and proper DOM cleanup. Additionally, it includes TypeScript definitions for better development experience.

svelte
Svelte

Svelte is a modern front-end framework that compiles your code at build time, resulting in smaller and faster applications. It uses a reactive approach to update the DOM, allowing for high performance and a smoother user experience.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

rollup
Rollup

RollupJS is a popular and efficient JavaScript module bundler that takes the code from multiple modules and packages them into a single optimized file, minimizing the overall size of the application and improving its performance.