How to disable ion-input?


Just want to know if it is possible to disable the ion-input? I tried to put “disabled” and I was still able to enter text




Where expression is whatever you want it to be.


Ideally you would be able to place the disabled attribute on ion-input and it would pass it down to the input element, but we’re not currently passing that attribute down. Created an issue:


It works with static values but it doesn’t adding disabled attribute dynamically such as:

<ion-input [disabled]="isDisabled ? '' : null">


Hi there ,

Is disable attribute working till now? I dont know why my code is not working.

           <ion-label stacked>Property Type</ion-label>
               <ion-select [(ngModel)]="propType" (ionChange)="ionChanger()" disabled="false" >
                   <ion-option value="{{ptype}}" *ngFor="let ptype of PropTypeArray">{{ptype}}</ion-option>                 

I want to trigger disabled attribute in my ts code. but still not working.

<ion-select [(ngModel)]="propType" (ionChange)="ionChanger()" disabled="myEnableTsPars" >


I tried disabling the ion-input and it’s working, but the opacity of the disabled style is not passed to the child tags, so the appearance of the ion-input does not change, even with the disabled attribute working.


please edit your answer: [disabled]=“expression” - lowercase ‘d’

Blockquote Can’t bind to ‘Disabled’ since it isn’t a known property of ‘ion-input’.


Good catch. Maybe it was because I posted that from my cellphonse. I tried to edit the message but I can’t :confused:


Though [disabled] seems to be working now, angular shows an warning about it if using reactive forms. I used [readonly] then, like:

<ion-item class="order__status-comments">
  <ion-label floating>Observação</ion-label>
  <ion-input formControlName="comments" [readonly]="status_loading" type="text"></ion-input>

And then (at SCSS):

.text-input[readonly] {
  color: #ccc;
  pointer-events: none;
  touch-action: none;


The point of that warning is that you’re supposed to call enabled() and disabled() directly from the controller, instead of mixing it up with change detection. Instead of switching to another attribute and manually trying to emulate the styling, I would just do this:

 <form [formGroup]="rform">
      <ion-checkbox formControlName="enabler"></ion-checkbox>
      <ion-input formControlName="fruit"></ion-input>
  rform: FormGroup;

  constructor(fb: FormBuilder) {
    let enabler = new FormControl();
    let fruitctl = new FormControl();
    this.rform ={
      "enabler": enabler,
      "fruit": fruitctl,
    enabler.valueChanges.subscribe(enabledp => {
      if (enabledp) {
      } else {


Hi there. I tried something similar (disabling a whole FormGroup with two FormControl inside) and also tried disabling each FormControl separately but somehow <ion-select> was being disabled properly but <ion-input> not, also showing a touched error if clicked while they were disabled temporarily, so I “solved” the way I showed up there. I wish your suggestion had worked here too. =/


bro where is the button