Modal

Plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.

Example

Toggle a working modal demo by clicking the button below. It will slide down and fade in from the top of the page.

<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
    Launch demo modal
</button>

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&#10005;</span>
                </button>
            </div>
            <div class="modal-body">
                Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer enim diam, laoreet a nisi id, bibendum congue orci.
                Nullam id auctor elit, non sollicitudin est. Quisque rutrum, nulla a aliquam facilisis, tellus ligula pellentesque
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>

As an image lightbox

Add .modal-lightbox to use a modal as an image lightbox.

<div class="modal modal-lightbox fade" id="exampleLightbox" tabindex="-1" role="dialog" aria-labelledby="exampleLightbox" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                     <span aria-hidden="true">&#10005;</span>
                </button>
            </div>
            <div class="modal-body">
                <img src="..." class="img-fluid" alt="Responsive image">
            </div>
        </div>
    </div>
</div>

View the complete modal documentation at Bootstrap website.

Loading...