BlinkID UI: examples

The goal of this page is to display minimal example and features of BlinkID UI component.

Important: to use BlinkID UI component it's required to have a valid license key. It's possible to obtain a free trial license key by registering to Microblink dashboard.

Minimal example

UI component with default behaviour where it's required to set valid license key, engine location and recognizer.

Recognizer: BlinkIdRecognizer

Note: since this page has multiple components, only this one has enabled drag and drop feature.

<blinkid-in-browser
  engine-location="http://localhost/resources/"
  license-key="LICENSE-KEY-GOES-HERE"
  recognizers="BlinkIdRecognizer"
></blinkid-in-browser>

Scan both sides

UI component with default behaviour where it's required to set valid license key and recognizer.

Recognizer: BlinkIdCombinedRecognizer

<blinkid-in-browser
engine-location="http://localhost/resources/"
license-key="LICENSE-KEY-GOES-HERE"
recognizers="BlinkIdCombinedRecognizer"
></blinkid-in-browser>

Scan identity document with barcode

UI component with default behaviour where it's required to set valid license key and recognizer.

Recognizer: IdBarcodeRecognizer

<blinkid-in-browser
engine-location="http://localhost/resources/"
license-key="LICENSE-KEY-GOES-HERE"
recognizers="IdBarcodeRecognizer"
></blinkid-in-browser>

Custom messages

It's possible to change default text messages which are displayed to the user.

Use attribute/property translations to change default messages.

Recognizer: BlinkIdRecognizer

<blinkid-in-browser
  engine-location="http://localhost/resources/"
  license-key="LICENSE-KEY-GOES-HERE"
  recognizers="BlinkIdRecognizer"
></blinkid-in-browser>
<script>
  const el = document.querySelector('blinkid-in-browser');

  // See src/utils/translations.ts for possible translation keys
  el.translations = {
    'action-message': 'Alternative CTA'
  };
</script>

RTL support

Set HTML attribute dir="rtl".

Recognizer: BlinkIdRecognizer

<blinkid-in-browser
  engine-location="http://localhost/resources/"
  license-key="LICENSE-KEY-GOES-HERE"
  recognizers="BlinkIdRecognizer"
  dir="rtl"
></blinkid-in-browser>
<script>
  const el = document.querySelector('blinkid-in-browser');

  // See src/utils/translations.ts for possible translation keys
  el.translations = {
    'action-message': 'Alternative CTA'
  };
</script>

UI customization

It's possible to ize UI of BlinkIdRecognizer component by using preset CSS variables.

Recognizer: BlinkIdRecognizer

Customizator


CSS variables

/* Global font family */
--mb-font-family:                             inherit;

/* Component (UI with buttons) */
--mb-component-background:                    #FFF;

--mb-component-font-color:                    #000;
--mb-component-font-size:                     14px;
--mb-component-font-style:                    normal;
--mb-component-font-weight:                   400;
--mb-component-letter-spacing:                normal;
--mb-component-line-height:                   20px;
--mb-component-text-transform:                none;

--mb-component-border-color:                  rgba(120, 120, 128, 0.2);
--mb-component-border-radius:                 5px;
--mb-component-border-style:                  solid;
--mb-component-border-width:                  1px;

--mb-component-box-shadow:                    none;

--mb-component-button-background:             #FFF;
--mb-component-button-border-color:           rgba(120, 120, 128, 0.2);
--mb-component-button-border-color-disabled:  rgba(116, 116, 128, 0.08);
--mb-component-button-border-radius:          20px;
--mb-component-button-border-style:           solid;
--mb-component-button-border-width:           1px;

--mb-component-button-box-shadow:             0px 1px 4px rgba(0, 0, 0, 0.1);
--mb-component-button-box-shadow-disabled:    none;

/* User feedback (messages below buttons) */
--mb-feedback-font-color-error:               #FF2D55;
--mb-feedback-font-color-info:                rgba(60, 60, 67, 0.7);
--mb-feedback-font-size:                      12px;
--mb-feedback-font-style:                     normal;
--mb-feedback-font-weight:                    400;
--mb-feedback-letter-spacing:                 normal;
--mb-feedback-line-height:                    16px;
--mb-feedback-text-transform:                 none;

/* Overlays */
--mb-overlay-draganddrop-background:          rgba(72, 178, 232, 0.25);
--mb-overlay-draganddrop-background-error:    rgba(255, 45, 85, 0.25);
--mb-overlay-draganddrop-border-color-error:  #FF2D55;
--mb-overlay-draganddrop-border-style-error:  dashed;