- Container
- Title
- Type Icon
- Close Icon
- Supporting Text
- Buttons
- Overlay
Title
- Use Title Case (the first letter of every word is uppercase, except for certain small words, such as articles and short prepositions)
- Use specific and short titles
Icon
- Confirm (question mark)
- Success
- Information
- Warning
- Error
Supporting Text
- Explain why the issue occurred in a specific and accurate manner
- Provide guidance for the user to complete the task (explain how to resolve the issue)
- If there is a proposed action, use the primary call-to-action button (please see the Button Pattern Page for more details)
- Use button names that accurately reflect the action that will occur
- Avoid Yes/No buttons
Behavior
Message boxes present a distinct choice to users through their title, content, and actions. The actions are represented as buttons and forcing users acknowledge or make a choice.
Interaction
- Message boxes appear without warning, requiring users to stop their current task
- They stay on the screen until dismissed or an action has been taken
- Message boxes can’t be closed by clicking on the overlay
Position
- Message boxes are centered vertically and horizontally
-
Avoid Scrolling
For scrollable content, consider using a Modal
-
Dismissing the message box
Most message boxes can only be dismissed by clicking on the “Close” icon or a button
Types
Confirm
Confirmation message boxes give users the ability to provide final confirmation of a choice before committing to it.
Success
Success message boxes confirm action has been completed. In most cases consider using the MessageBar
.
Information message boxes provide the user with information about the state of the page. The user acknowledges the provided information does not involve a decision.
Warning
Warning message boxes are used to highlight a potential issue but allow the user to continue.
Error
Error message boxes interrupt the user with urgent information, details, or actions.