Modals

Use a modal for dialog boxes, confirmation messages, or other content that can be called up. In order for the modal to work you have to add the Modal ID to the link of the trigger.

Basic

Modal
                        
<!-- Modal Trigger -->
<a class="waves-effect waves-light btn default" href="#modal1">Modal</a>

<!-- Modal Structure -->
<div id="modal1" class="modal">
    <div class="modal-content">
        <h4>Modal Header</h4>
        <p>A bunch of text</p>
    </div>
    <div class="modal-footer">
        <a href="#!" class="modal-action modal-close waves-effect waves-red btn-flat ">Disagree</a>
        <a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Agree</a>
    </div>
</div>
                        
                    
                        
$(document).ready(function(){
    // Initialized modal
    $('.modal').modal();
    //You can also open modals programatically, the below code will make your modal open on document ready:
    $('#modal1').modal('open');
    //You can also close them programatically:
    $('#modal1').modal('close');
});
                        
                    

Modals with Fixed Footer

Modal With Fixed Footer

Bottom Sheet Modals

Modal Bottom Sheet Style
                        
<!-- Modal Trigger -->
<a class="waves-effect waves-light btn default" href="#modal3">Modal</a>

<!-- Modal Structure -->
<div id="modal3" class="modal bottom-sheet">
    <div class="modal-content">
        <h4>Modal Header</h4>
        <p>A bunch of text</p>
    </div>
    <div class="modal-footer">
        <a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Agree</a>
    </div>
</div>
                        
                    
                        
$(document).ready(function(){
    // Initialized modal
    $('.modal').modal();
    //You can also open modals programatically, the below code will make your modal open on document ready:
    $('#modal3').modal('open');
    //You can also close them programatically:
    $('#modal3').modal('close');
});
                        
                    

Options

You can customize the behavior of each modal using these options. For example, you can call a custom function to run when a modal is dismissed. To do this, just place your function in the intialization code as shown below.