Alert

Android · iOS · Web
Alerts communicate contextual information and give users feedback on actions they've taken.

Overview

Alerts provides important information or feedback to users, such as confirmations, errors, warnings that require user attention. They're designed to grab the user's attention and deliver concise messages without disrupting the overall user experience.

Live demo

Incorrect password or username. Please try again.
Content
Modifiers

Usage

Do

  • Use an Alert as a response to user-submitted information or to communicate contextual information to a collection of components.

  • Display messages with actionable or next steps.

  • Keep Alert messages short and to the point.

Don't

  • Avoid overusing Alerts for trivial information to prevent banner blindness.

  • For errors related to form inputs; use the error message of the relevant input.

  • Do not overwhelm users with multiple Alerts simultaneously.

  • Avoid using unclear or ambiguous language in Alert messages.

  • Do not use Alerts to provide supporting text for form inputs; use the helper text of the input instead.

  • Avoid interrupting users with non-essential messages that are not critical or relevant to their current context.

  • Avoid changing the icons in Alerts. These help keep message sentiments clear and consistent through the product.


Incorrect password or username. Please try again.


Placement

Place the Alert component in a prominent position on the screen, ensuring it is visible and easily noticeable. Common placements include at the top of the page or near the relevant content.

Content

  • Use language that is clear, action-oriented, and appropriate for the context.

  • Include relevant details to help users understand the nature of the Alert and any necessary actions.

  • Be limited to a few important calls to action with no more than one primary action.

  • Be concise: keep content to 1 to 2 sentences where possible.

  • Explain how to resolve the issue, particularly for warning and critical banners.


Styles

ExampleStateWhen to use
Alert message
NeutralTo display general information or non-critical messages that don't fall into specific categories, for example welcome messages.
Alert message
InfoTo provide informative messages that don't represent a problem or require immediate attention. For example, tips or additional information.
Alert message
SuccessTo confirm the successful completion of a task or action. For example, completion of a process.
Alert message
WarningTo alert users about potential issues that may lead to problems if not addressed. For example, a warning about an action that could have unintended consequences.
Alert message
ErrorTo indicate that an error or issue has occurred, requiring the user's attention to resolve. For example a form submission error.

Accessibility

Ensure that the Alert component is accessible to users with disabilities by adhering to the following guidelines:

  • Torq’s Alerts contain icons for accessibility and consistency. Avoid removing these for user understanding.

  • Implement visible focus styles to indicate the currently focused element for keyboard users.

  • Ensure that users can navigate to Alerts using keyboard controls.

By following these best practices and guidelines, the Alert component can effectively convey information to users while maintaining accessibility and a positive user experience.

iOS guidance

Along with the guidance above, there is some iOS specific guidance for this component.

  • Follow standard iOS Alert styles, using UIAlertController or UIAlertViewController for simplicity or complexity.

  • Use the title and message fields in UIAlertController for clear and concise information presentation.

  • Utilise system-provided icons when applicable for enhanced user recognition.

  • Test Alerts on various iOS devices for consistent presentation and ensure accessibility with accessible labels and alternative text.