×

Ionic Checkbox

Ionic Checkbox

Ionic Checkbox is nearly the same as a toggle. It can be placed in an ionic element or used as a separate checkbox. It is designed differently for every platform, such as other ionic components. You can use the <ion-checkbox> attribute to set the default value and the disabled quality to prevent the user from changing the value.

Example: The given below example shows several types of checkboxes used in an ionic application.


  
   
    Checkbox
   
  
 
  
  Names 
  
  
 
  College
  
 
  
  Address
  
 
 
   State
   
   

When you execute this code in your localhost, then you will get an output, which is shown in the given below screenshot.

When you execute this code in your localhost,

Adding Checkbox

To create a Checkbox form, you require to add the checkbox class name to both design and the input elements. The following example displays how to add two simple checkboxes, one is checked, and the other is not.

Example:

  
   
   
  CheckBox 
   
   
   
  
  
  • checkbox 1
  • checkbox 2

After the execution of this code in your localhost, then you will get an output, which is shown in the given below screenshot.

execution of this code in your localhost

Multiple Checkboxes

In multiple checkboxes, you can create various checkboxes or select several checkboxes. Now we will show how to create or choose multiple checkboxes from the following code.

Example:

  
   
   
  CheckBox 
   
   
   
   
    
  
  • checkbox 1
  • checkbox 2
  • checkbox 3
  • checkbox 4

After the execution of this code in your localhost, then you will get an output, which is shown in the given below screenshot.

execution of this code in your localhost

Styling checkbox

If you want to style a checkbox, you can use the Ionic color attribute with the checkbox prefix. The following example shows how to design checkboxes from the ionic color attributes with the checkbox component.

Example:

 
   
   
  CheckBox 
   
   
   
   
    
  
  • checkbox 1
  • checkbox 2
  • checkbox 3
  • checkbox 4
  • checkbox 5
  • checkbox 6
  • checkbox 6

After the execution of this code in your localhost, then you will get an output, which is shown in the given below screenshot.

After the execution of this code in your localhost

Related Topics

Ionic Colors

Ionic Colors Before we start with the actual elements available in the Ionic frame, let's understand a little bit how Ionic uses colors for different elements. Ionic Color Classes Ionic framework is a set of nine predefined...

3 minutes read.

Ionic Navigation and Routing

The latest version (ionic 4) of the ionic framework, no longer limited to the angular. In Ionic 4, you can create an ionic project in different front-end frameworks such as Vue.js, React.js, and...

6 minutes read.

Ionic Grid

The Ionic grid is a very powerful mobile-first flexbox system for building the custom layouts. It is a CSS feature supported by all devices that ionic supports. The Ionic grid is composed of...

11 minutes read.

History of Ionic

It is a complete open-source platform for hybrid mobile application development created by Ben Sperry, Max Lynch, and Adam Bradley of Drifty Co. in 2013. The first alpha version of the framework was...

2 minutes read.

Ionic Date Time

Ionic Date Time The DateTime component is used to display an interface that makes it simple for users to select dates and times. Tapping on <ion-datetime> will display a slider up from the...

4 minutes read.

Ionic Checkbox

Ionic Checkbox Ionic Checkbox is nearly the same as a toggle. It can be placed in an ionic element or used as a separate checkbox. It is designed differently for every platform, such...

2 minutes read.

Ionic Infinite Scroll

The infinite scroll permits you to perform an action when the user scrolls a particular content from the bottom or top of the page. When you display the large collection of data...

3 minutes read.

Ionic Radio

Ionic Radio The radio button is the type of input component that has a Boolean value. The Ionic radio button has a different pattern on every platform, as well as other Ionic components....

2 minutes read.

Ionic Segment

A segment is a collection of buttons, sometimes which are known as segmented controls. The segment buttons are displayed at horizontal rows. These segment buttons can be shown in a toolbar or the...

2 minutes read.

Ionic Chip

Ionic chip displays the complex entities in small entities in small blocks, such as the contacts. Ionic chip has several types of elements like avatars, thumbnails, text, and icons. It is a bubble-like...

3 minutes read.

Ionic Geolocation

In today’s time, the mobile location plays an essential role in the mobile application. The Ionic Cordova geolocation plugin provides information about the location of the device, like as latitude and longitude. The...

5 minutes read.

Ionic Refresher

Refresher means updating the currently showing page so that the user can see the latest view. It is also known as re-loading in web technology. It provides a pull- to-refresh feature on a...

4 minutes read.

Ionic vs Apache Cordova

Ionic Vs Apache Cordova Ionic and Cordova are two popular technology going on in the market for mobile application development. The combination of these two technologies creates a development platform that is known as...

3 minutes read.

Ionic Popover

The Ionic popover is a small dialog box that displays at the top of the screen. It can be used for anything, but it is usually used for a button, an action,...

4 minutes read.

Ionic Spinner

The ionic spinner component provides the various SVG (Scalable Vector Graphic) spinners. Ionic spinners are the visual indicators that display the app which is loading content or performing another process that the user...

5 minutes read.

Ionic Range

The Range slider lets users choose from a range of values by moving the slider knob. You can accept two knobs, but by default, one-knob controls the range value. Range labels You can put down on...

2 minutes read.

Ionic Tabs

The ionic tabs mostly used for mobile navigation. It means that tabs are placed at the top of the display on android devices, while at the bottom on IOS. It does not provide...

2 minutes read.

Ionic Editors

Editors are software programs that permit the users to create and edit the text files. In the development field, editors are usually used to create the source code editors that includes many specific...

3 minutes read.

Ionic Cards

Ionic Cards: Ionic cards are a standard part of the user interface that acts as an entry point for more specific information. These are the best components for displaying information...

4 minutes read.

Ionic Loading

The ionic loader is an overlay that can be used to indicate activity, the user interaction while blocking. The ionic loader shows on the top of the app content, and it can...

5 minutes read.