Modals

Modals interrupt users and demand an action. They are appropriate when user’s attention needs to be directed toward important information.

Usage

Overview
How to Use When to Use When Not to Use
Anatomy Behaviors Interactions
Accessibility
Related Components StyleMaster Brand

ULTRUS

HTML/CSSDefault
Behavior Specification
Feature: Modal
        Background: There is a modal
          Given a modal is open
      
          Scenario: Close modal by clicking on [X]
            When I click on the close icon
            Then the modal disappears
      
          Scenario: Close modal by typing ESC
            When I type the Escape key
            Then the modal disappears
      
          Scenario: Close modal by clicking on scrim
            When I click on the scrim
            Then the modal disappears
      
          Scenario: Commit transaction
            Given the modal is transactional
            When I click on the primary action
            Then the modal gives me confirmation feedback
      
          Scenario: Prevent transaction
            Given the modal is transactional
            And the transaction requirements are not met
            When I click on the primary action
            Then the transaction does not follow through
            And the modal gives me negative feedback