Ionic Checkbox
Ionic Checkbox: Checkbox is basically used for selecting items from the set of choice. Ionic provides classes to create beautiful checkboxes. A label wrapper with class checkbox is used to wrap the input checkbox. It will represent both the selected and unselected checkboxes in beautiful design. We are going to explain the ionic Checkboxes with example and online demo.
Ionic Checkbox Example
Here is simple example of ionic checkbox with shows both states of checkbox.
Ionic Checkbox Example And Demo
<ul class="list"> <li class="item item-checkbox"> Item 1 <label class="checkbox"> <input type="checkbox"> </label> </li> <li class="item item-checkbox"> Item 2 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> </ul> |
The above example produce the following output as below-
Ionic Multiple Checkboxes
You can create multiple checkboxes in ionic. The li class .item-checkbox is used to create multiple checkboxes in ionic framwork.
Ionic Checkbox Example And Demo
<ul class="list"> <li class="item item-checkbox"> Item 1 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox"> Item 2 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox"> Item 3 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox"> Item 4 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox"> Item 5 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox"> Item 6 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox"> Item 7 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> </ul> |
The above example produce the following output as below-
Ionic Colored Checkbox
You can add colors to the ionic checkboxes using color classes available in ionic to create colored Checkboxes-
Ionic Colored Checkbox
<ul class="list"> <li class="item item-checkbox checkbox-light"> Item 1 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox checkbox-royal"> Item 2 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox checkbox-assertive"> Item 3 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox checkbox-energized"> Item 4 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox checkbox-calm"> Item 5 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox checkbox-stable"> Item 6 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> <li class="item item-checkbox checkbox-positive"> Item 7 <label class="checkbox"> <input type="checkbox" checked="Checked"> </label> </li> </ul> |
The above example produce the following output as below-
Advertisements
Add Comment
📖 Read More
- 1. Ionic Radio Button
- 2. Ionic Range
- 3. Ionic Select
- 4. Ionic Tabs
- 5. Ionic Grid
- 6. Ionic Colors
- 7. Ionic Icons
- 8. Ionic Action Sheet
- 9. Ionic Backdrop
- 10. Ionic js Content