Search code examples
angularangular6angular-ngselect

Change Colors in Ng-Select


I have tried using ng-select and i encountered some problem. How can i change the disabled color in ng-select when i try to disabled it. And i want also the arrow icon to be hidden when it is disabled? I have tried this code below and it still won't work.

Change disabled color

.ng-select.ng-select-red {
  color: green;
  background-color: green;
}

Hide Arrow When Disabled

.ng-select:disabled.ng-arrow {
   display: none;
}

Solution

  • Use the following selectors:

    .ng-select.ng-select-disabled>.ng-select-container {
      background-color: red;
    }
    
    .ng-select.ng-select-disabled .ng-arrow-wrapper {
      display: none;
    }