Components
Dialog - contextual
The contextual dialog is a practical tool for giving additional information when requested and needed, resulting in a clutter-free experience. It provides relevant details and important notifications, ensuring a streamlined user experience.
Interactive demo
This demo lets you preview the contextual dialog component and its variations.
Usage
Contextual dialogs offer helpful tips and extra information in a simple and non-intrusive way, helping users better understand and navigate the interface with a clutter free experience.
Principles
Is the information necessary for a user to complete a task?
- Yes - Keep it visible.
- No - Put it in a Contextual dialog.
Content
When to use what
There are two different types of Contextual dialogs – Advanced and Simple.
Closing the contextual dialog
Closing a contextual dialog efficiently is important for user experience. Here are two approaches based on the simplicity or advanced nature of the contextual dialog.
Formatting
Anatomy
The Contextual dialog consist of essential components like the container, content, and optional elements for presenting information or capturing input.
Placement
Based on user position
The placement of the Contextual dialog can vary based on its relation to the context. It can appear either above or below the content, depending on the position of the user within the page.
Elevation
Contextual dialogs are displayed at 24dp elevation and display a shadow. They appear above other content.
Behaviour
Scaling and adaption
When scaling layouts for larger screens, a contextual dialog’s visual presentation is adjusted.
The width of the contextual dialog should not exceed 560 px. Contextual dialogs should always maintain a distance of 24 px to each side of the screen (top, bottom, left and right).
If the content of a contextual dialog exceeds available space, consider using another component more suited to fulfill the user's needs
Mobile
Contextual dialogs have a fixed width of 296 px on smaller screens.
Margins
Contextual dialogs maintain a minimum distance of 24 px on each side of the screen in desktop views and 12 px in mobile views.
Example of proper usage
In the example below, we have the contextual dialog used with an Icons menu to provide additional information about Joker. This approach avoids overwhelming the user with excessive visible content and allows the more important actions to remain prominent and easily accessible