Dialogs provide the user with a focused way of accomplishing, confirming, or viewing something without entirely leaving a screen or page.
Header / title bar
Content
Footer
<div class="modal fade in">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Rename file</h4>
</div>
<div class="modal-body">
<form role="form" class="">
<div class="form-group">
<label for="tb12" class="control-label">Enter a new file name</label>
<input type="text" class="form-control" id="tb12" value="dialogs.md">
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="pull-left btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary">Save</button>
</div>
</div>
</div>
</div>
<div class="modal fade in">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Find and replace</h4>
</div>
<div class="modal-body">
<form role="form" class="form-horizontal">
<div class="form-group">
<label for="tb14" class="col-sm-4 control-label">Find</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="tb14">
</div>
</div>
<div class="form-group">
<label for="tb13" class="col-sm-4 control-label">Replace with</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="tb13">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-4 col-sm-8">
<div class="checkbox">
<label><input type="checkbox" name="optionsCheckboxes" id="optionsCheckboxes1" value="option1" checked>Match case</label>
</div>
<div class="checkbox">
<label><input type="checkbox" name="optionsCheckboxes" id="optionsCheckboxes2" value="option2" checked>Whole word</label>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Find</button>
<button type="button" class="btn btn-default" data-dismiss="modal" disabled>Replace</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Replace all</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Done</button>
</div>
</div>
</div>
</div>
<div class="modal fade in">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="text-success">Thank you!</h4>
<p>Your request has been submitted.</p>
</div>
<div class="modal-footer">
<button type="button" class="pull-left btn btn-default">Back</button>
<button type="button" class="btn btn-success">View request</button>
</div>
</div>
</div>
</div>
A confirmation dialog is short, simple dialog that ensures the user is performing an action intentionally. This is especially useful for dangerous or irreversible operations.
<div class="modal fade in">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="text-danger">Delete this user?</h4>
<p>All user information will be deleted.</p>
</div>
<div class="modal-footer">
<button type="button" class="pull-left btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger">Delete user</button>
</div>
</div>
</div>
</div>
<div class="modal fade in">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4>Abandon changes?</h4>
<p>You have unsaved changes. Your changes will be lost.</p>
</div>
<div class="modal-footer">
<button type="button" class="pull-left btn btn-default">Leave this page</button>
<button type="button" class="btn btn-primary" data-dismiss="modal">Stay on this page</button>
</div>
</div>
</div>
</div>
An actionless dialog may block user interaction for a period of time, usually until something finishes or some other event occurs.
<div class="modal fade in">
<div class="modal-dialog">
<div class="modal-content modal-center">
<div class="modal-body">
<div style="margin-bottom: 6px;" class="clearfix">
<div class="pull-left">Uploading document...</div>
<span class="pull-right text-muted">60%</span>
</div>
<div class="progress" style="margin-bottom: 0;">
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
</div>
</div>
</div>
</div>
</div>
</div>
Dialogs can prevent the user from performing actions behind/around the dialog if desired. There are 3 general modes: