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

@ngmthaq20/react-face-id-capture

v1.0.7

Published

React component for face registration with real-time face detection and multi-angle capture

Readme

@ngmthaq20/react-face-id-capture

React component for face registration with real-time face detection and multi-angle capture. Guides users through capturing 6 face poses (center, top, top-left, top-right, left, right) using AI-powered face detection.

Installation

yarn add @ngmthaq20/react-face-id-capture

Peer Dependencies

yarn add react react-dom i18next react-i18next

i18next and react-i18next are optional — the component will auto-initialize i18n if your app doesn't already use it.

Quick Start

import { FaceRegister } from "@ngmthaq20/react-face-id-capture";

function App() {
  return (
    <FaceRegister
      onComplete={(captures) => {
        // captures: array of 6 face images
        captures.forEach((c) => {
          console.log(c.step); // "center" | "top" | "topLeft" | "topRight" | "left" | "right"
          console.log(c.labelKey); // translation key for the step label
          console.log(c.data); // base64 JPEG data URL
        });
      }}
      onExit={() => {
        // Called when user taps back on intro or discard on result screen
        console.log("User exited");
      }}
    />
  );
}

Props

| Prop | Type | Description | | -------------- | ------------------------------- | ------------------------------------------------------------------------------- | | onComplete | (captures: Capture[]) => void | Called when all 6 face images are captured and user taps "Save & Continue" | | onExit | () => void | Called when user taps back on intro screen or "Discard & Exit" on result screen | | locale | string | Override the active language ("en", "ja", or custom) | | translations | FaceRegisterTranslations | Override or extend translation strings |

Capture Object

interface Capture {
  step: "center" | "top" | "topLeft" | "topRight" | "left" | "right";
  labelKey: string; // i18n key for the step label (e.g. "faceRegister.labelCenter")
  data: string; // base64 JPEG data URL
}

Internationalization

Built-in languages: English (en) and Japanese (ja).

Change language

<FaceRegister locale="ja" onComplete={handleComplete} />

Override specific strings

<FaceRegister
  translations={{
    introTitle: "Verify Your Identity",
    getStarted: "Begin Scan",
    save: "Confirm & Continue",
  }}
  onComplete={handleComplete}
/>

Add a custom language

<FaceRegister
  locale="ko"
  translations={{
    introTitle: "얼굴 등록",
    introSub: "본인 확인을 위해 얼굴 프로필을 설정합니다",
    getStarted: "시작하기",
    // ... all keys
  }}
  onComplete={handleComplete}
/>

All Translation Keys

| Key | Default (EN) | | ------------------- | ------------------------------------------- | | introTitle | Face Registration | | introSub | Set up your face profile for identification | | introStep1 | Position your face within the oval frame | | introStep2 | Follow the crosshair by moving your head | | introStep3 | Hold still during the countdown to capture | | getStarted | Get Started | | back | Back | | hudTitle | Face Registration | | hudProgress | {{current}} / {{total}} | | stepCenter | Look straight ahead | | stepTop | Tilt your face up | | stepTopLeft | Tilt your face up and left | | stepTopRight | Tilt your face up and right | | stepLeft | Turn your face left | | stepRight | Turn your face right | | outsideOval | Move your face into the oval | | maskWarning | We need to see your full face | | maskWarningDetail | Make sure nothing is covering your face | | labelCenter | Center | | labelTop | Top | | labelTopLeft | Top Left | | labelTopRight | Top Right | | labelLeft | Left | | labelRight | Right | | resultTitle | Registration Complete | | resultSub | {{count}} face images captured successfully | | registerAgain | Register Again | | save | Save & Continue | | discard | Discard & Exit | | loadingModels | Loading face detection models... |

Exported Types

import type {
  Capture,
  FaceRegisterProps,
  FaceRegisterTranslations,
  StepName,
} from "@ngmthaq20/react-face-id-capture";

How It Works

  1. Intro Screen — Instructions with a "Get Started" button
  2. Capture Screen — Camera feed with an oval overlay and crosshair guide. The component detects the user's face in real-time and validates head position (yaw, pitch, roll). When the pose matches, a countdown triggers and the frame is captured automatically.
  3. Result Screen — Displays all 6 captured images in a grid with "Save & Continue", "Register Again", and "Discard & Exit" options.

Requirements

  • HTTPS required for camera access (except localhost)
  • Face detection models are loaded from CDN (@vladmandic/face-api)
  • Works on desktop and mobile browsers

License

MIT