Taiga UI 5.0 is out!

InputPin KIT

GitHub

On this page

Basic

Default configuration with digits only
    
      
    
    
      <tui-textfield>
    <input
        maxlength="4"
        placeholder="••••"
        tuiInputPin
        [formControl]="control"
    />
</tui-textfield>

    

Alphanumeric

Changing mask to allow letters
    
      
    
    
      <tui-textfield
    tuiTextfieldSize="m"
    [style.text-transform]="'uppercase'"
>
    <input
        autocapitalize="characters"
        inputmode="text"
        mask="^[a-zA-Z0-9]+$"
        maxlength="5"
        tuiInputPin
        [(ngModel)]="value"
    />
</tui-textfield>

    

Hidden

Minimal gap is 0.25rem, additional spacing can be added using gap on tui-textfield
    
      
    
    
      <tui-textfield
    tuiTextfieldSize="s"
    [style.-webkit-text-security]="'disc'"
    [style.gap.rem]="0.75"
    [style.width.rem]="9"
>
    <input
        maxlength="3"
        tuiInputPin
        [formControl]="control"
    />
</tui-textfield>