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

@swetrix/captcha

v2.3.0

Published

Swetrix CAPTCHA

Readme

Description

Swetrix CAPTCHA is a privacy-oriented, simple and opensource CAPTCHA service.

See the full documentation at https://docs.swetrix.com/captcha/introduction

Features

  • Privacy-focused: No tracking, no cookies
  • Accessible: Full keyboard navigation, ARIA support, screen reader announcements, respects prefers-reduced-motion
  • Progress indicator: Visual progress bar during verification
  • Auto theme detection: Automatically matches browser's light/dark mode preference
  • Lightweight: Minimal footprint, fast loading

Usage

Script tag

<div class="swecaptcha" 
     data-project-id="YOUR_PROJECT_ID" 
     data-theme="auto">
</div>
<script src="https://cdn.swetrixcaptcha.com/captcha-loader.js" defer></script>

npm

npm install @swetrix/captcha
import '@swetrix/captcha'

The package automatically renders .swecaptcha elements when the DOM is ready. You can also trigger a reload manually:

import { forceLoadCaptcha, loadCaptcha } from '@swetrix/captcha'

// Render any .swecaptcha elements that are not initialised yet.
loadCaptcha()

// Re-render all .swecaptcha elements, replacing existing widgets.
forceLoadCaptcha()

Options

| Attribute | Description | Values | Default | |-----------|-------------|--------|---------| | data-project-id | Your project ID | Valid project ID | Required | | data-theme | Color theme | auto, light, dark | auto | | data-response-input-name | Hidden input name | Any string | swetrix-captcha-response | | data-lang | Force a specific language | en, de, fr, pl, uk, hu | Auto-detected | | data-asset-url | Custom URL for CAPTCHA package assets | Any absolute or relative URL | https://cdn.swetrixcaptcha.com/dist/ |

Language Support

The widget supports English, German, French, Polish, Ukrainian, and Hungarian.

Language is detected automatically in this order:

  1. data-lang attribute on the widget element
  2. lang attribute on parent elements (e.g., <html lang="de">)
  3. Browser's preferred language

Theme Options

  • auto: Automatically detects user's browser theme preference using prefers-color-scheme
  • light: Forces light theme
  • dark: Forces dark theme

Development

To build the captcha run:

npm run build

After you build it, a new folder dist will appear. You can run test.html file via an extension like Live server to test it (don't forget to set up a valid project ID or one of our dummy project IDs).

License

Swetrix CAPTCHA client is released under the MIT licence, see LICENSE.

Bugs and security

Swetrix is open to pull-requests. Feel free to propose new features or submit bug requests via pull reuqests.
For severe security issues, please contact us at [email protected]

Contact

You can contact us via email at [email protected]