Answers for "mat input with suffix buton"

1

mat-input mask

npm install --save ngx-mask
...
@NgModule({
  imports: [
    NgxMaskModule.forRoot(),
  ],
})
...
<input type="text" mask="9999999-9999" />
Posted by: Guest on July-22-2020
1

stylin mat input

//Standard
  .mat-form-field {
    .mat-input-element {
      color: slategray;
    }
    .mat-form-field-label {
      color: slategray;
    }
    .mat-form-field-underline {
      background-color: slategray;
    }
    .mat-form-field-ripple {
      background-color: slategray;
    }
    .mat-form-field-required-marker {
      color: slategray;
    }
  }

  //Focus
  .mat-form-field.mat-focused {
    .mat-form-field-label {
      color: #ff884d;
    }
    .mat-form-field-ripple {
      background-color: #ff884d;
    }
    .mat-form-field-required-marker {
      color: #ff884d;
    }
    .mat-input-element {
      color: #ff884d;
    }
  }

  //Error
  .mat-form-field.mat-form-field-invalid {
    .mat-input-element {
      color: #ff33cc;
    }
    .mat-form-field-label {
      color: #ff33cc;
      .mat-form-field-required-marker {
        color: #ff33cc;
      }
    }
    .mat-form-field-ripple {
      background-color: #ff33cc;
    }
  }
Posted by: Guest on March-25-2020

Browse Popular Code Answers by Language