Socket
Book a DemoInstallSign in
Socket

@microblink/blinkid-ux-manager

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microblink/blinkid-ux-manager

BlinkID UX Manager provides user feedback based on the blinkid process results.

latest
Source
npmnpm
Version
7.6.0
Version published
Weekly downloads
756
17.57%
Maintainers
1
Weekly downloads
 
Created
Source

@microblink/blinkid-ux-manager

This package provides user experience management and feedback UI for the BlinkID browser SDK. It parses results from @microblink/blinkid-core and guides the user through the scanning process, controlling @microblink/camera-manager as needed.

Features

  • Smart UI State Management: Provides both headless and UI components for user feedback during scanning
  • Camera Integration: Integrates with BlinkID Core and Camera Manager
  • Haptic Feedback: Built-in haptic feedback support for enhanced user experience on mobile devices
  • Document Filtering: Advanced document class filtering capabilities
  • Timeout Management: Configurable scanning timeouts with automatic state management
  • Localization Support: Multi-language support with customizable strings

Overview

  • Provides both headless and UI components for user feedback during scanning.
  • Integrates with BlinkID Core and Camera Manager.
  • Includes haptic feedback system for mobile devices.
  • Used by @microblink/blinkid and can be used directly for custom UI integrations.

Installation

Install from npm using your preferred package manager:

npm install @microblink/blinkid-ux-manager
# or
yarn add @microblink/blinkid-ux-manager
# or
pnpm add @microblink/blinkid-ux-manager

Haptic Feedback

The UX Manager includes a comprehensive haptic feedback system that provides tactile responses during the document scanning process. This feature is primarily designed for Android devices using Chrome browser, where it works reliably to enhance the scanning experience.

Haptic Feedback Types

EventDurationTypeDescription
First Side Success100msShortWhen the first side of an ID card is captured
Final Success300msLongWhen document scanning is completed
Error States100msShortQuality issues (blur, glare, positioning)
Error Dialogs300msLongTimeout or critical errors
Flashlight Toggle100msShortWhen camera flashlight is activated
Warning States100msShortDuring sensing phases (with 1s cooldown)

Haptic Feedback Usage

import {
  BlinkIdUxManager,
  HapticFeedbackManager,
} from "@microblink/blinkid-ux-manager";

// Create UX Manager (haptic feedback enabled by default)
const uxManager = new BlinkIdUxManager(cameraManager, scanningSession);

// Check if haptic feedback is supported
if (uxManager.isHapticFeedbackSupported()) {
  console.log("Device supports haptic feedback");
}

// Enable/disable haptic feedback
uxManager.setHapticFeedbackEnabled(true); // Enable
uxManager.setHapticFeedbackEnabled(false); // Disable

// Access haptic manager directly for manual control
const hapticManager = uxManager.getHapticFeedbackManager();
hapticManager.triggerShort(); // 100ms vibration for short feedback
hapticManager.triggerLong(); // 300ms vibration for long feedback
hapticManager.stop(); // Stop all vibration

Browser Compatibility

⚠️ Important: Haptic feedback uses the Web Vibration API, which has limited browser support:

Usage

You can use @microblink/blinkid-ux-manager directly in your project for advanced or custom integrations. For most use cases, use @microblink/blinkid for a simpler setup.

See the example apps in the apps/examples directory in the GitHub repository for usage details.

Development

To build the package locally:

  • Install dependencies in the monorepo root:

    pnpm install
    
  • Build the package:

    pnpm build
    
  • Run tests:

    pnpm test
    

The output files will be available in the dist/ and types/ directories.

Internationalization

You can customize UI strings when creating the feedback UI:

createBlinkIdFeedbackUi(uxManager, cameraUi, {
   localizationStrings: {
      scan_the_barcode: "Please scan the barcode"
   }
});

Provided Translations

Click to see all available translation files

You can import any of these files directly or use them as a starting point for your own localization.

FAQs

Package last updated on 30 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts