Home » Ionic Toggle

Ionic Toggle

The Ionic toggle is a type of input component which holds a Boolean value. It changes the state of a single option. It allows the user to switch a setting on or off by pressing or swiping them. It can also be checked programmatically by using the checked property. You can also apply different types of attributes such as disabled, and value to the toggle to control its behavior.

The following example shows how you can use the <ion-toggle> component in your Ionic app. Here, we can see the default toggle, checked toggle, and the disabled toggle.

Example

Output

Ionic Toggle

Styling the Toggle

The styling of toggle elements is very easy. It uses all the colors that are available in the Ionic framework. The following example shows the use of different colors with list and toggle elements.

Example

Output

Ionic Toggle


Next TopicIonic Toolbar

You may also like