# PIN component - PinField

{% hint style="info" %}
Availability of the functionality depends on the license and may not be available in all deployments.
{% endhint %}

A component used to enter a PIN code. It currently supports 4- or 6-digit codes. The number of digits in the component depends on the implementation. The component value is sent after the entire PIN has been entered; validation also takes place then.

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2Fgit-blob-7632cb46436a46105ac73266ceeadd84812cbff7%2FpinInput1.png?alt=media" alt=""><figcaption></figcaption></figure>

✅ **When to use:**

* When data must be entered with a strictly defined number of characters (e.g. a 4-digit login PIN code or a 6-digit SMS authorization code).
* When, for security reasons, you want to mask the entered characters (the component allows digits to be masked with dots).

:x: When not to use:

When the length of the entered string is variable (e.g. an account password with a length from 8 to 20 characters). **Use**: [TextField](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/biblioteka-komponentow-bazowych/1-wprowadzanie-danych-inputs/pole-tekstowe-textfield).

## Component properties

| Property                                                  | Description                                                                                                                                                                                                                                                                                                   |
| --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ARIA label** (section **WCAG**)                         | Property corresponding to comma-separated attributes `aria-label` of the individual inputs that make up the PIN component. By default, "1,2,3,4,5,6". To make a screen reader user aware that they are in a PIN control, it may be necessary to modify this value, e.g. to "pin control 1,pin control 2,...". |
| **Character masking in the field** (section **Security**) | Selecting the "Mask characters in the field" option in the component properties (Security section) causes the entered characters to be replaced with dots in the field view.                                                                                                                                  |

> More information about the component properties: [Common component properties](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/interfejs-uzytkownika/formularze/praca-z-komponentami-bazowymi/wspolne-wlasciwosci-komponentow)

## Component appearance

<figure><img src="https://content.gitbook.com/content/2CssJT0zIo4SJQLbSZ6l/blobs/bukWTp5aYHEeYRUBAs3P/17k_files/image2024-10-8_16-17-45.png" alt=""><figcaption><p><em><strong>Figure 1.</strong> The appearance of the component on the form.</em></p></figcaption></figure>

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2FgFcAtgJqsTVVeDdrEn0p%2Fobraz.png?alt=media&#x26;token=7c5803cd-1db2-4d77-8012-7235ca080946" alt=""><figcaption><p><em><strong>Figure 2.</strong> The appearance of the component for a 4-digit code.</em></p></figcaption></figure>

<figure><img src="https://2112972046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2CssJT0zIo4SJQLbSZ6l%2Fuploads%2Fgit-blob-c3fa080053257ec43ae064551fdfd2c60cbbf4a7%2FpinInput2.png?alt=media" alt=""><figcaption><p><em><strong>Figure 3.</strong> The appearance of the component with character masking.</em></p></figcaption></figure>

{% hint style="info" %}
Demo application: demoPin
{% endhint %}
