npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@myrasec/eu-captcha-angular19

v1.0.1

Published

EU CAPTCHA integration for **Angular 19**.

Downloads

108

Readme

@myrasec/eu-captcha-angular19

EU CAPTCHA integration for Angular 19.

For full documentation see docs.eu-captcha.eu.

You can sign up for free to get a sitekey.

Other Angular versions | Package | Angular | |---------|---------| | @myrasec/eu-captcha-angular19 | Angular 19 ← you are here | | @myrasec/eu-captcha-angular20 | Angular 20 | | @myrasec/eu-captcha-angular21 | Angular 21 |

Installation

npm i @myrasec/eu-captcha-angular19

Basic usage

Standalone component

import { Component } from '@angular/core';
import { EuCaptchaComponent, isEuCaptchaDone } from '@myrasec/eu-captcha-angular19';

@Component({
  standalone: true,
  imports: [EuCaptchaComponent],
  template: `
    <form (submit)="handleSubmit($event)">
      <!-- your fields -->
      <eu-captcha sitekey="EUCAPTCHA_SITE_KEY" />
      <button type="submit">Submit</button>
    </form>
  `,
})
export class MyFormComponent {
  handleSubmit(event: Event): void {
    event.preventDefault();
    if (!isEuCaptchaDone()) {
      // challenge not yet complete
      return;
    }
    // proceed with form submission
  }
}

NgModule-based app

import { NgModule } from '@angular/core';
import { EuCaptchaModule } from '@myrasec/eu-captcha-angular19';

@NgModule({
  imports: [EuCaptchaModule],
})
export class AppModule {}
<!-- in your template -->
<eu-captcha sitekey="EUCAPTCHA_SITE_KEY" />

You can test the integration using any fake sitekey. If a sitekey does not exist, the captcha runs with default parameters which allow traffic to pass.

Inputs

| Input | Type | Default | Description | |---|---|---|---| | sitekey | string | — | Your public sitekey (required) | | theme | string | "light" | Visual theme: "light" or "dark" | | width | number | 330 | Widget width in pixels | | height | number | 100 | Widget height in pixels | | widgetId | string | — | Custom widget ID. If omitted, an ID is auto-generated. Needed when calling euCaptcha.execute(). | | autostart | boolean | true | Start the challenge automatically on mount. Set to false to defer until euCaptcha.execute(widgetId) is called. |

Outputs

| Output | Payload | Description | |---|---|---| | completed | string | Emitted with the encoded token when the challenge completes. | | expired | — | Emitted when the token expires (60 minutes after completion). | | error | — | Emitted when the challenge fails due to a network or server error. |

Dark theme

<eu-captcha sitekey="EUCAPTCHA_SITE_KEY" theme="dark" />

Custom width

<eu-captcha sitekey="EUCAPTCHA_SITE_KEY" [width]="280" />

Custom height

<eu-captcha sitekey="EUCAPTCHA_SITE_KEY" [height]="60" />

Deferred execution

Set [autostart]="false" and provide a widgetId, then trigger the challenge manually:

<eu-captcha
  sitekey="EUCAPTCHA_SITE_KEY"
  widgetId="my-captcha"
  [autostart]="false"
/>

<button (click)="euCaptcha.execute('my-captcha')">Verify</button>

Listening to events

<eu-captcha
  sitekey="EUCAPTCHA_SITE_KEY"
  (completed)="onToken($event)"
  (expired)="onExpired()"
  (error)="onError()"
/>
onToken(token: string): void {
  console.log('token:', token);
}

onExpired(): void {
  console.log('token expired');
}

onError(): void {
  console.log('challenge error');
}

Querying state

Before submitting a form to a server, ensure EU CAPTCHA is done:

import { isEuCaptchaDone } from '@myrasec/eu-captcha-angular19';

function handleSubmit(): void {
    if (!isEuCaptchaDone()) {
        // challenge not yet complete
        return;
    }
    // proceed with form submission
}

Listening to state change

Listen for the euCaptchaDone window message to be notified when the challenge completes:

import { Component, OnInit, OnDestroy } from '@angular/core';

@Component({ /* ... */ })
export class MyComponent implements OnInit, OnDestroy {
  private listener = (msg: MessageEvent) => {
    if (msg.data.type === 'euCaptchaDone') {
      // enable submit button, update state, etc.
    }
  };

  ngOnInit(): void {
    window.addEventListener('message', this.listener, false);
  }

  ngOnDestroy(): void {
    window.removeEventListener('message', this.listener, false);
  }
}