Files
ionic-framework/packages/core/src/components/checkbox

ion-checkbox

Placed in an ion-item or used as a stand-alone checkbox.


 <ion-list>

   <ion-item>
     <ion-label>Pepperoni</ion-label>
     <ion-checkbox value="pepperoni" checked></ion-checkbox>
   </ion-item>

   <ion-item>
     <ion-label>Sausage</ion-label>
     <ion-checkbox value="sausage" disabled></ion-checkbox>
   </ion-item>

   <ion-item>
     <ion-label>Mushrooms</ion-label>
     <ion-checkbox value="mushrooms"></ion-checkbox>
   </ion-item>

 </ion-list>

Properties

checked

boolean

If true, the checkbox is selected. Defaults to false.

color

string

The color to use. Default options are: "primary", "secondary", "danger", "light", and "dark".

disabled

boolean

If true, the user cannot interact with the checkbox. Default false.

mode

any

The mode determines which platform styles to use. Possible values are: "ios" or "md".

name

string

The name of the control, which is submitted with the form data.

value

string

the value of the checkbox.

Attributes

checked

boolean

If true, the checkbox is selected. Defaults to false.

color

string

The color to use. Default options are: "primary", "secondary", "danger", "light", and "dark".

disabled

boolean

If true, the user cannot interact with the checkbox. Default false.

mode

any

The mode determines which platform styles to use. Possible values are: "ios" or "md".

name

string

The name of the control, which is submitted with the form data.

value

string

the value of the checkbox.

Events

ionBlur

Emitted when the toggle loses focus.

ionChange

Emitted when the checked property has changed.

ionFocus

Emitted when the toggle has focus.

ionStyle

Emitted when the styles change.


Built by StencilJS