Skip to main content
MybringDesign System

Modal

Handling prompts as page modals

React component

We also have a modal React component.

Guidelines

Confirm/Cancel

Descriptive title

A prompt for confirmation that is clear and unambiguous in message and choices.

<dialog
  aria-labelledby="dialog-1-title"
  aria-describedby="dialog-1-desc"
  class="mb-modal maxw32r"
  open
>
  <div>
    <h2 id="dialog-1-title" class="text-1.25r">Descriptive title</h2>
    <p id="dialog-1-desc" class="mbl">
      A prompt for confirmation that is clear and unambiguous in message and choices.
    </p>
    <div class="tr">
      <button class="btn">Cancel</button>
      <button class="btn btn--green mls">Confirm and proceed</button>
    </div>
  </div>
</dialog>

Destructive, non-reversible action

Delete key

All connections using this key will stop working. It cannot be recovered, but you can generate a new one. Are you sure you want to delete your key?

<dialog
  aria-labelledby="dialog-2-title"
  aria-describedby="dialog-2-desc"
  class="mb-modal mb-modal--danger maxw32r"
  open
>
  <div>
    <h2 id="dialog-2-title" class="text-1.25r">Delete key</h2>
    <p id="dialog-2-desc" class="mbl">
      All connections using this key will stop working. It cannot be
      recovered, but you can generate a new one. Are you sure you want to
      delete your key?
    </p>
    <div class="tr">
      <button class="btn">No, cancel</button>
      <button class="btn btn--danger mls">Yes, delete key</button>
    </div>
  </div>
</dialog>