Materialize CSS Checkbox

Materialize provides a checkbox feature for creating styled checkboxes for the websites. The standard HTML checkboxes are plain with a simple black border in unchecked and a tick mark in checked states, but with materialize border style can be changed along with the tick mark.

For creating a checkbox with the default style, <input type=”checkbox”> is used. The for attribute is necessary to bind the custom checkbox with the input. This is done by adding the input’s id as the value of the for the attribute of the label. The example below shows all the different types checkboxes used in materialize form.






<!DOCTYPE html>
        <!--Import Google Icon Font-->
        <link href=
              rel="stylesheet" />
        <!-- Compiled and minified CSS -->
        <link rel="stylesheet" 
        <script type="text/javascript" 
        <script src=
        <!--Let browser know website 
          is optimized for mobile-->
        <meta name="viewport" 
                       initial-scale=1.0" />
    <body class="container">
        <div class="intro-text">
            <h3>Checkbox with Materialize CSS</h3>
            <form action="#">
                    <input type="checkbox"
                           id="test1" />
                    <label for="test1">First Option</label>
                    <input type="checkbox" 
                           checked="checked" />
                    <label for="test2">Checked Option</label>
                    <input type="checkbox"
                           checked="checked" />
                    <label for="filled-in-box">
                      Filled in</label>
                    <input id="indeterminate-checkbox"
                           type="checkbox" />
                    <label for="indeterminate-checkbox">
                      Indeterminate Style</label>
                    <input type="checkbox"
                           disabled="disabled" />
                    <label for="test3">
                      Disabled Ckeched</label>
                    <input type="checkbox"
                           disabled="disabled" />
                    <label for="test4">Disabled</label>
        <!-- Compiled and minified JavaScript -->
        <script src=



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.