# Modal

JDS extends Bootstrap Modal component with a variety of options to provide unique looking Modal components that matches SCJDS's design standards.

For more info on Bootstrap Modal please visit the official [Bootstrap Documentation](https://getbootstrap.com/docs/4.5/components/modal/).

### [Interactive demo](https://vision.crimsonlogic.studio/jds/v2.1/components.html#modals-wrapper)

### Modals

<figure><img src="https://131633009-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5tcH1W94H2w1w4BOYwsj%2Fuploads%2F17IX8HxswuJheJKq94pr%2Fimage.png?alt=media&#x26;token=6f1c4303-36ab-498a-9d4d-1f6a7a39b897" alt=""><figcaption></figcaption></figure>

```html
 <!-- Button trigger modal-->
        <button type="button" class="btn btn-primary me-2" data-bs-toggle="modal" data-bs-target="#jdsModalSizeSm">Modal - Small</button>
        <button type="button" class="btn btn-primary me-2" data-bs-toggle="modal" data-bs-target="#jdsModalSizeDefault">Modal - Default</button>
        <button type="button" class="btn btn-primary me-2" data-bs-toggle="modal" data-bs-target="#jdsModalSizeLg">Modal - Large</button>
        <button type="button" class="btn btn-primary me-2" data-bs-toggle="modal" data-bs-target="#jdsModalSizeXl">Modal - Extra Large</button>
        <button type="button" class="btn btn-primary me-2" data-bs-toggle="modal" data-bs-target="#jdsModalSizeFullwidth">Modal - Full Width</button>
        <!--begin::Modal-->
        <div class="modal fade" id="jdsModalSizeSm" tabindex="-1" aria-labelledby="jdsModalSizeSm" aria-hidden="true" style="display: none;">
          <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <h4 class="modal-title">Modal Title</h4>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
              </div>
              <div class="modal-body">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                it to make a type specimen book.</div>
              <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal">Action</button>
                <button type="button" class="btn btn-primary">Action</button>
              </div>
            </div>
          </div>
        </div>
        <!--end::Modal--> 
        <!--begin::Modal-->
        <div class="modal fade" id="jdsModalSizeDefault" tabindex="-1" aria-labelledby="jdsModalSizeDefault" aria-hidden="true" style="display: none;">
          <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <h4 class="modal-title">Modal Title</h4>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
              </div>
              <div class="modal-body">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</div>
              <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal">Action</button>
                <button type="button" class="btn btn-primary">Action</button>
              </div>
            </div>
          </div>
        </div>
        <!--end::Modal--> 
        <!--begin::Modal-->
        <div class="modal fade" id="jdsModalSizeLg" tabindex="-1" aria-labelledby="jdsModalSizeLg" aria-hidden="true" style="display: none;">
          <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <h4 class="modal-title">Modal Title</h4>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
              </div>
              <div class="modal-body">
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                  it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                  it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal">Action</button>
                <button type="button" class="btn btn-primary">Action</button>
              </div>
            </div>
          </div>
        </div>
        <!--end::Modal--> 
        
        <!--begin::Modal-->
        <div class="modal fade" id="jdsModalSizeXl" tabindex="-1" aria-labelledby="jdsModalSizeXl" aria-hidden="true" style="display: none;">
          <div class="modal-dialog modal-dialog-centered modal-xl" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <h4 class="modal-title">Modal Title</h4>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
              </div>
              <div class="modal-body">
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                  it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                  it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                  it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal">Action</button>
                <button type="button" class="btn btn-primary">Action</button>
              </div>
            </div>
          </div>
        </div>
        <!--end::Modal--> 
        <!--begin::Modal-->
        <div class="modal fade" id="jdsModalSizeFullwidth" tabindex="-1" aria-labelledby="jdsModalSizeFullwidth" aria-hidden="true" style="display: none;">
          <div class="modal-dialog modal-dialog-centered modal-fullwidth" role="document">
            <div class="modal-content">
              <div class="modal-header">
                <h4 class="modal-title">Modal Title</h4>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
              </div>
              <div class="modal-body">
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                  it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                  it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
                <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
                  it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
              </div>
              <div class="modal-footer">
                <button type="button" class="btn btn-outline-primary" data-bs-dismiss="modal">Action</button>
                <button type="button" class="btn btn-primary">Action</button>
              </div>
            </div>
          </div>
        </div>
        <!--end::Modal--> 
```

### Confirmation Dialogs

<div align="left"><img src="https://131633009-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVPzFJV0KiMDuBMGmVD%2F-MZSUhHIesGyLm78Noe_%2F-MZSVCIj1oGtaqBfyWRA%2Fimage.png?alt=media&#x26;token=e92bad99-c9b3-4c31-9088-863cf054badf" alt=""></div>

#### Default

<div align="left"><img src="https://131633009-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MVPzFJV0KiMDuBMGmVD%2F-MZSUhHIesGyLm78Noe_%2F-MZSV1wToigtxpLUDRpW%2Fimage.png?alt=media&#x26;token=a3165078-446a-420c-bf2a-0c0d16ea399a" alt=""></div>

```
<!--Buttons to trigger confirmation dialogs-->
<button type="button" class="btn btn-outline-primary" data-toggle="modal" data-target="#default">Default</button>
<button type="button" class="btn btn-outline-success" data-toggle="modal" data-target="#success">Success</button>
<button type="button" class="btn btn-outline-warning" data-toggle="modal" data-target="#warning">Warning</button>
<button type="button" class="btn btn-outline-error" data-toggle="modal" data-target="#error">Error</button>
<button type="button" class="btn btn-outline-example" data-toggle="modal" data-target="#example">Example</button>
<!--Confirmation dialog modals-->
<div class="modal fade" id="default" tabindex="-1" aria-labelledby="default" style="display: block;" aria-modal="true" role="dialog">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
      <div class="modal-content has-icon alert alert-default">
        <div class="modal-header">
          <h3 class="modal-title"><i class="fas fa-info-circle"></i>Confirm Action</h3>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
        </div>
        <div class="modal-body">
          <p>Are you sure you want to take this <strong>Specific Action</strong> ?</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-outline" data-dismiss="modal">Cancel</button>
          <button type="button" class="btn btn-primary btn-action">OK</button>
        </div>
      </div>
    </div>
  </div>
  <div class="modal fade" id="success" tabindex="-1" aria-labelledby="success" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
      <div class="modal-content has-icon alert alert-success">
        <div class="modal-header">
          <h3 class="modal-title"><i class="fas fa-check-circle"></i>Confirm Action</h3>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
        </div>
        <div class="modal-body">
          <p>Are you sure you want to take this <strong>Specific Action</strong> ?</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-outline" data-dismiss="modal">Cancel</button>
          <button type="button" class="btn btn-success btn-action">OK</button>
        </div>
      </div>
    </div>
  </div>
  <div class="modal fade" id="warning" tabindex="-1" aria-labelledby="warning" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
      <div class="modal-content has-icon alert alert-warning">
        <div class="modal-header">
          <h3 class="modal-title"><i class="fas fa-exclamation-circle"></i>Confirm Action</h3>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
        </div>
        <div class="modal-body">
          <p>Are you sure you want to take this <strong>Specific Action</strong> ?</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-outline" data-dismiss="modal">Cancel</button>
          <button type="button" class="btn btn-warning btn-action">OK</button>
        </div>
      </div>
    </div>
  </div>
  <div class="modal fade" id="error" tabindex="-1" aria-labelledby="error" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
      <div class="modal-content has-icon alert alert-error">
        <div class="modal-header">
          <h3 class="modal-title"><i class="fas fa-times-circle"></i>Confirm Action</h3>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
        </div>
        <div class="modal-body">
          <p>Are you sure you want to take this <strong>Specific Action</strong> ?</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-outline" data-dismiss="modal">Cancel</button>
          <button type="button" class="btn btn-error btn-action">OK</button>
        </div>
      </div>
    </div>
  </div>
  <div class="modal fade" id="example" tabindex="-1" aria-labelledby="example" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
      <div class="modal-content has-icon alert alert-example">
        <div class="modal-header">
          <h3 class="modal-title"><i class="fal fa-lightbulb-on"></i>Confirm Action</h3>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <i aria-hidden="true" class="fal fa-times"></i> </button>
        </div>
        <div class="modal-body">
          <p>Are you sure you want to take this <strong>Specific Action</strong> ?</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-outline" data-dismiss="modal">Cancel</button>
          <button type="button" class="btn btn-example btn-action">OK</button>
        </div>
      </div>
    </div>
  </div>
```
