import { Meta } from '@storybook/addon-docs/blocks'

<Meta title="Guide|Quick Acrtio" />

# Quick Action Modal

Modals are used to show information without losing context, or when the system requires a user response, without opening a new view.

## Usage
Use modals sparingly because they interrupt the user’s workflow. Don’t surprise users by popping up a modal. Let a user’s action, such as a button click, following a link or selecting an option, trigger the modal. Uninvited modals may surprise the user and result in a quick dismissal of the window.

## When to use

Modals should be used when:

- The system requires a user response
- A non-revertible destructive action is about to take place and needs confirmation

**Alternatives:**

When designing an experience that incorporates the need for a modal, but does not match one of the use cases described above, consider one of the following before reverting to a modal:

**Expanding elements:** Utilize elements such as accordions, tooltips, or other expanding non-modal patterns to convey your information.

**Toast:** Present your message within a toast; a brief, auto-expiring element for the user to consume while staying focused on their task.

**New view:** Take the user to a different view so that the interaction may be isolated without losing access to core navigational elements within the application.

**Other non-modal patterns:** Consider alternative patterns such as non-modal dialogs or undo patterns to continue the system-user conversation while keeping the user focused on their task.

## Layout

**Title**
The title is brief and quickly describe what's the modal about

**Body**
The body can contain descriptive text but also inputs or other components that are required.

**Actions**
Actions include a cancel action, to close the modal and a primary action that complete the process.