Modals
Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults.
Use the class .modal
in combination with one or more nested layout components to quickly create a new modal. Below is an example of simple modal with a header, body, and footer.
Stay updated on the latest news and releases from CNVS. Join our mailing list today. We hate spam too.
Use a button or link to trigger the display of a modal. CNVS uses the class .fade
to hide the modal. Adding the class .in
to .fade
will display the modal in. You can easily override these class styles to create unique keyframe sequences for your project.
Stay updated on the latest news and releases from CNVS. Join our mailing list today. We hate spam too.
<a href="#" class="button" data-toggle="modal" data-target="#myModal">Show Modal</a>
<div class="modal fade" id="myModal">
…
</div>
To create a new modal use the .modal
class. A modal is composed of 3 primary sections, all of which are optional and can be used interchangeably – .modal-header
, .modal-body
, and .modal-footer
. Looking for just the body and footer? It’s as simple as not including .modal-header
in your modal.
<div class="modal">
<div class="modal-header">
…
</div>
<div class="modal-body">
…
</div>
<div class="modal-footer">
…
</div>
</div>
Two additional modal sizes are provided by CNVS using the class modifiers .modal-small
and .modal-large
. The class modifiers only impact the width of the modal and, if defined in CNVS, the inner padding of the header, body, and footer.
Use the class modifier .modal-small
to reduce the width of your modal.
<div class="modal modal-small modal-inline">
…
</div>
Use the class modifier .modal-large
to increase the width of your modal.
<div class="modal modal-large modal-inline">
…
</div>