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

@smileid/web-sdk

v12.0.0

Published

A collection of Web Components used by SmileID

Readme

Instructions

These components can be used to capture id document or liveness images

  1. smart-camera-web
  2. document-capture-screens
  3. selfie-capture-screens
  4. user-details
  5. consent

user-details

<smileid-user-details> is a standalone, product-agnostic form that collects the end user's name and a contact method (email and/or phone). It is used by the v3 SmartSelfie flow when the partner config omits user_details, and can be mounted by any product without pulling in the selfie/smart-camera-web bundle.

import '@smileid/web-sdk/user-details';
<smileid-user-details theme-color="#001096"></smileid-user-details>

Attributes

  • theme-color — primary colour of the Continue button (default #001096).
  • hide-attribution"true" to hide the "Powered by Smile ID" footer.

Event

  • smileid-user-details.submitted — dispatched on window when the user submits a valid form. event.detail is { given_names, last_name, email?, phone_number? } (at least one of email/phone_number; phone normalized to E.164). The payload type is exported as UserDetailsPayload.

consent

<smileid-consent> is a standalone, product-agnostic, region-aware consent screen. It is shown by v3 product flows (SmartSelfie, DocV, Biometric KYC, …) when the partner config omits a granted consent_information, and can be mounted by any product without pulling in the selfie/smart-camera-web bundle.

import '@smileid/web-sdk/consent';
<smileid-consent
  theme-color="#001096"
  partner-name="Acme"
  policy-url="https://acme.example/privacy"
  consent-region="eu"
></smileid-consent>

Attributes

  • theme-color — primary colour of the Allow button (default #001096).
  • hide-attribution"true" to hide the "Powered by Smile ID" footer.
  • partner-name — partner name interpolated into the notice copy.
  • partner-logo — partner logo URL shown in the header lockup.
  • policy-url — partner privacy-policy URL linked from "Learn more".
  • consent-region"eu" starts the checkbox un-ticked and blocks Allow until ticked (regulated regions); "non-eu" may start pre-ticked; any other value (or none) auto-detects from the browser's locale/timezone, defaulting to the compliance-safe "eu" behaviour when ambiguous. The initial checkbox state is read on first render, so set consent-region before inserting the element into the DOM.

Events

  • smileid-consent.granted — dispatched on window when the user grants consent. event.detail is { granted: true, granted_at } (granted_at is an ISO 8601 timestamp). Consumers enrich this into the full v3 consent part by adding notice_language and notice_privacy_policy_url from their own config. The detail type is exported as ConsentGrantedDetail.
  • smileid-consent.denied — dispatched on window when the user declines.

Localization

The web components support multiple languages and string customization through the localisation module.

Quick Start

import { setCurrentLocale, getDirection } from '@smileid/web-sdk/localisation';

// Set language (supports 'en-GB', 'fr-FR', 'ar-EG')
await setCurrentLocale('fr-FR');

// Apply RTL direction for Arabic
document.documentElement.dir = getDirection();

Customizing Strings

Override specific UI text:

await setCurrentLocale('en-GB', {
  locales: {
    'en-GB': {
      selfie: {
        instructions: {
          title: 'Verify your identity with a selfie',
        },
      },
    },
  },
});

Adding Custom Languages

Register a new language:

import {
  registerLocale,
  setCurrentLocale,
} from '@smileid/web-sdk/localisation';

registerLocale('sw-KE', {
  direction: 'ltr',
  common: {
    back: 'Rudi',
    continue: 'Endelea',
    // ... all required keys
  },
});

await setCurrentLocale('sw-KE');

📖 Full Localization Guide - Complete documentation including available languages, all translation keys, and custom language setup.

Orchestration

To build your own flow, we have several components that can be used together.

document-capture-instructions

This is the screen used to instruct the user how to capture document using both the camera and/or upload.