How to give border color to input fields of ng-otp-input package in Angular?

Issue

I am using ng-otp-input package and I want to change the border color of the input field to red when they are focused.
Package Reference link https://github.com/code-farmz/ng-otp-input
Below is my code
HTML

     <ng-otp-input (onInputChange)="pinModelChange('otp',$event)" [config]="otpConfig"
                ></ng-otp-input>

TYPESCRIPT

 otpConfig :NgOtpInputConfig = {
    allowNumbersOnly: true,
    length: 6,
    isPasswordInput: false,
    disableAutoFocus: false,
    placeholder: '',
    inputStyles:{
      'display':'flex'
    },
    containerStyles:{
      'display':'flex'
    },
    inputClass:'each_input',
    containerClass:'all_inputs'
  };

CSS

.each_input:focus{
  border: 2px solid red!important;
}

I unable to remove the solid black border when the input field is in focused state

Solution

try

.each_input:focus {
    outline-style: solid;
    outline-color: red;
}

Answered By – c.m.

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published