Dialogues are interactive elements that help manage user interactions by temporarily interrupting the main content flow to provide critical information, request actions, or guide users through tasks.
See the Notifications or Banners sections for messages that do not interrupt the user flow.
A modal dialogue temporarily interrupts the main content flow to capture the user's attention.
It appears as a layer over the main interface, often dimming the background content to emphasize its importance.
Users must interact with the modal before returning to the underlying application.
Modal Dialogues are used for:
Tutorials guide users through specific features or functionalities, temporarily interrupting the main content flow to focus the user's attention on learning or understanding a feature.
They appear prominently over the main interface, using a translucent background to draw attention to the tutorial content while partially revealing the underlying interface.
Users are guided step-by-step through the functionality, explaining how to use specific features or perform tasks.
The final slide of each tutorial includes a feedback system with five reaction buttons, allowing users to choose the one that best represents their feedback. They can skip this step by selecting 'Done' instead. Once a reaction is selected, the buttons disappear, and a message saying 'Thank you for your feedback!' appears, confirming that their response has been captured.
Aios offers both mandatory and optional tutorials:
The Onboarding Tutorial starts automatically when a user first opens Aios (SMART Referrals). This tutorial ensures that users understand key features and essential workflows before they begin using the system.
Some mandatory tutorials may be context-sensitive, appearing when users interact with complex features for the first time (ex. Edit Mode).
Optional tutorials provide on-demand guidance, assisting users in completing tasks by demonstrating necessary steps and interactions. These tutorials help users become familiar with features without disrupting their workflow.
/*DIALOGUES*/
.mdc-dialog .aios-dialogue-surface {
border: none;
border-radius: 10px;
color: black;
}
.mdc-dialog .aios-dialogue-title {
font-size: 18px;
font-family: var(--base-font-family);
font-weight: 500;
text-transform: capitalize;
color: #000000;
padding: 5px;
align-items: center;
display: flex;
position: relative;
padding-right: 50px;
}
.mdc-dialog .aios-dialogue-title::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 1px;
background-color: var(--Grey-xl);
}
.aios-dialogue-close-area {
width: 50px;
height: 50px;
position: absolute;
top: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
border-top-right-radius: 10px;
background-color: transparent;
cursor: pointer;
z-index: 1;
}
.aios-dialogue-close-area .material-symbols-rounded {
color: var(--Grey-ml)
}
.aios-dialogue-close-area:hover {
background-color: var(--Red)
}
.aios-dialogue-close-area:hover .material-symbols-rounded {
color: white;
}
.mdc-dialog .aios-dialogue-content {
font-size: 14px;
font-family: var(--base-font-family);
padding: 20px;
color: black;
}
/*More Details on Dialogues*/
#more-info {
overflow: hidden;
height: 0;
opacity: 0;
transition: height 0.4s ease, opacity 0.3s ease;
}
#more-info.open {
opacity: 1;
}
#toggle-details {
color: var(--RoyalBlue);
cursor: pointer;
text-decoration: underline;
}
/*TUTORIALS*/
/*First Slide only*/
.introjs-floating {
background-color: white;
color: black;
border-radius: 10px;
box-shadow: 0px 3px 6px rgba(0,0,0, 0.15);
font-family: var(--base-font-family);
margin: 20px;
min-width: 400px;
box-shadow: 0px 3px 6px rgba(0,0,0, 0.15);
}
/*Header and title*/
.introjs-tooltip {
background-color: white;
color: black;
border-radius: 10px;
box-shadow: 0px 3px 6px rgba(0,0,0, 0.15);
font-family: var(--base-font-family);
margin: 20px;
min-width: 400px;
}
.introjs-tooltiptext {
font-size: 14px;
padding: 20px;
font-family: var(--base-font-family);
}
.introjs-tooltip-header {
position: relative;
padding: 10px 20px 10px 20px;
}
.introjs-tooltip-header::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 1px;
background-color: var(--Grey-xl);
}
.introjs-tooltip-title {
font-family: var(--base-font-family);
font-weight: 500;
font-size: 18px;
text-transform: capitalize;
color: #000000;
align-items: center;
display: flex;
position: relative;
}
.introjs-tooltip-header::after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 1px;
background-color: var(--Grey-xl);
}
.introjs-tooltip-title::before {
content: none;
}
/*Arrows*/
.introjs-arrow {
border: 15px solid transparent;
content: "";
position: absolute;
}
.introjs-arrow.top {
top: -30px;
left: 30px;
border-bottom-color: #fff;
}
.introjs-arrow.top-right {
top: -30px;
right: 30px;
border-bottom-color: #fff;
}
.introjs-arrow.top-middle {
top: -30px;
left: 50%;
margin-left: -15px;
border-bottom-color: #fff;
}
.introjs-arrow.right {
right: -30px;
top: 30px;
border-left-color: #fff;
}
.introjs-arrow.right-bottom {
bottom: 30px;
right: -30px;
border-left-color: #fff;
}
.introjs-arrow.bottom {
bottom: -30px;
left: 30px;
border-top-color: #fff;
}
.introjs-arrow.bottom-right {
bottom: -30px;
right: 30px;
border-top-color: #fff;
}
.introjs-arrow.bottom-middle {
bottom: -30px;
left: 50%;
margin-left: -15px;
border-top-color: #fff;
}
.introjs-arrow.left {
left: -30px;
top: 30px;
border-right-color: #fff;
}
.introjs-arrow.left-bottom {
left: -30px;
bottom: 30px;
border-right-color: #fff;
}
/* Tutorial Buttons */
.introjs-skipbutton {
color: var(--Grey-ml);
font-weight: 400;
font-size: 26px;
}
.introjs-skipbutton:hover {
color: var(--Grey-xd);
font-weight: 400;
}
/*MANDATORY TUTORIAL - Hide Skip Button*/
.mandatory-tutorial .introjs-skipbutton {
display: none !important;
color: var(--Grey-ml);
font-weight: 500;
}
.introjs-tooltipbuttons {
display: flex;
position: relative;
flex-shrink: 0;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
min-height: 52px;
margin: 0;
padding: 8px;
border-top: 1px solid transparent;
text-shadow: none;
}
.introjs-button.introjs-nextbutton {
min-width: 60px;
height: 40px;
border-radius: 40px;
box-shadow: 0px 3px 6px rgba(0,0,0, 0.15);
font-family: var(--base-font-family);
font-size: 14px;
font-weight: 500;
white-space: nowrap;
margin: 5px;
cursor: pointer;
transition: background-color 0.0s, border-color 0.0s, color 0.0s;
padding: 0 25px;
display: inline-flex;
align-items: center;
justify-content: center;
align-items: center;
position: relative;
line-height: 40px;
border: var(--PuertoRico) solid 1px;
background-color: var(--PuertoRico);
color: white;
text-shadow: none;
}
.introjs-button.introjs-nextbutton:hover {
border: var(--PuertoRico-d) solid 1px;
background-color: var(--PuertoRico-d);
text-shadow: none;
}
.introjs-button.introjs-nextbutton:active {
border: var(--PuertoRico-xd) solid 1px;
font-weight: 500;
text-shadow: none;
background-color: var(--PuertoRico-xd);
color: white;
}
.introjs-button.introjs-prevbutton {
min-width: 60px;
height: 40px;
border-radius: 40px;
box-shadow: 0px 3px 6px rgba(0,0,0, 0.15);
font-family: var(--base-font-family);
font-size: 14px;
font-weight: 500;
white-space: nowrap;
margin: 5px;
cursor: pointer;
transition: background-color 0.0s, border-color 0.0s, color 0.0s;
padding: 0 25px;
display: inline-flex;
align-items: center;
justify-content: center;
align-items: center;
position: relative;
line-height: 40px;
border: 1px solid white;
background-color: white;
color: var(--PuertoRico);
text-shadow: none;
}
.introjs-button.introjs-prevbutton:hover {
border: var(--PuertoRico) solid 1px;
font-weight: 500;
text-shadow: none;
}
.introjs-button.introjs-prevbutton:active {
border: var(--PuertoRico) solid 1px;
font-weight: 500;
text-shadow: none;
background-color: var(--PuertoRico);
color: white;
}
.introjs-button.introjs-disabled {
color: var(--Grey-m);
background-color: var(--White);
border: var(--White) solid 1px;
cursor: not-allowed;
text-shadow: none;
}
.introjs-button.introjs-disabled:hover {
color: var(--Grey-m);
background-color: var(--White);
border: var(--White) solid 1px;
cursor: not-allowed;
text-shadow: none;
}
/*Emoji Buttons*/
#feedback-container {
display: flex;
justify-content: center;
align-items: center;
gap: 5px;
}
.emoji-button {
width: 40px;
height: 40px;
border-radius: 40px;
border: none;
font-size: 28px;
white-space: nowrap;
margin: 10px;
cursor: pointer;
padding: 10px;
display: inline-flex;
align-items: center;
justify-content: center;
align-items: center;
position: relative;
line-height: 40px;
background-color: white;
}
.emoji-button:hover {
font-size: 38px;
}
.emoji-button:active {
font-size: 28px;
}
.thank-you-message {
margin: 10px;
padding: 10px;
}
/* Step numbers */
.introjs-tooltip .introjs-helperNumberLayer {
color: var(--Grey-md);
font-family: var(--base-font-family);
font-size: 14px;
}
//DIALOGUES
window.onload = () => {
const smallDialog = new mdc.dialog.MDCDialog(document.querySelector('#small-dialog'));
const mediumDialog = new mdc.dialog.MDCDialog(document.querySelector('#medium-dialog'));
const errorDialog = new mdc.dialog.MDCDialog(document.querySelector('#error-dialog'));
const warningDialog = new mdc.dialog.MDCDialog(document.querySelector('#warning-dialog'));
const reccDialog = new mdc.dialog.MDCDialog(document.querySelector('#recc-dialog'));
const infoDialog = new mdc.dialog.MDCDialog(document.querySelector('#info-dialog'));
//Open dialogue buttons
document.querySelector('#open-small-dialog-button').addEventListener('click', () => {
smallDialog.open();
});
document.querySelector('#open-medium-dialog-button').addEventListener('click', () => {
mediumDialog.open();
});
document.querySelector('#open-error-dialog-button').addEventListener('click', () => {
errorDialog.open();
});
document.querySelector('#open-warning-dialog-button').addEventListener('click', () => {
warningDialog.open();
});
document.querySelector('#open-recc-dialog-button').addEventListener('click', () => {
reccDialog.open();
});
document.querySelector('#open-info-dialog-button').addEventListener('click', () => {
infoDialog.open();
});
//Close dialogue buttons
document.querySelector('#close-small-dialog-button').addEventListener('click', () => {
smallDialog.close();
});
document.querySelector('#close-medium-dialog-button').addEventListener('click', () => {
mediumDialog.close();
});
document.querySelector('#close-error-dialog-button').addEventListener('click', () => {
errorDialog.close();
});
document.querySelector('#close-warning-dialog-button').addEventListener('click', () => {
warningDialog.close();
});
document.querySelector('#close-info-dialog-button').addEventListener('click', () => {
infoDialog.close();
});
document.querySelector('#close-recc-dialog-button').addEventListener('click', () => {
reccDialog.close();
});
};
//More Details for dialogues
const toggleLink = document.getElementById('toggle-details');
const moreInfo = document.getElementById('more-info');
toggleLink.addEventListener('click', function (e) {
e.preventDefault();
if (!moreInfo.classList.contains('open')) {
// Expand
moreInfo.style.height = moreInfo.scrollHeight + "px";
moreInfo.classList.add("open");
toggleLink.textContent = "Less Details";
// Clean up inline height after transition for flexibility
moreInfo.addEventListener("transitionend", function cleanup() {
moreInfo.style.height = "auto";
moreInfo.removeEventListener("transitionend", cleanup);
});
} else {
// Collapse
moreInfo.style.height = moreInfo.scrollHeight + "px"; // Set to current height to trigger transition
// Force reflow (important for Chrome)
void moreInfo.offsetHeight;
moreInfo.style.height = "0px";
moreInfo.classList.remove("open");
toggleLink.textContent = "More Details";
}
});
//TUTORIALS
//Mandatory
document.getElementById('open-onboarding-dialog-button').addEventListener('click', function() {
const feedbackHTML = `
`;
// Start Intro.js tutorial
introJs().setOptions({
steps: [
{
intro: "This guide will walk you through the key features of SMART Referrals (powered by Aios).",
tooltipClass: 'introjs-floating custom-tooltip mandatory-tutorial',
title: "Welcome to SMART Referrals"
},
{
element: document.querySelector('#open-small-dialog-button'),
intro: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
tooltipClass: 'custom-tooltip mandatory-tutorial',
title: "Title 1",
},
{
element: document.querySelector('#open-medium-dialog-button'),
intro: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
tooltipClass: 'custom-tooltip mandatory-tutorial',
title: "Title 2",
},
{
element: document.querySelector('#open-info-dialog-button'),
intro: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
tooltipClass: 'custom-tooltip mandatory-tutorial',
title: "Title 3",
},
{
title: "How did you like the tour?",
intro: feedbackHTML, // Assign HTML as a string
tooltipClass: 'custom-tooltip mandatory-tutorial'
}
],
showStepNumbers: true,
scrollToElement: true,
positionPrecedence: ["left", "right", "bottom", "top"],
nextLabel: 'Next',
prevLabel: 'Previous',
doneLabel: 'Done',
exitOnOverlayClick: false,
exitOnEsc: false,
showBullets: false,
disableInteraction: true,
}).start();
// Handle emoji button clicks inside the tutorial
document.querySelector('body').addEventListener('click', function(event) {
// Only trigger if an emoji button is clicked and the feedback container exists
if (event.target && event.target.classList.contains('emoji-button')) {
const feedbackContainer = document.getElementById('feedback-container');
if (feedbackContainer) {
// Check if "Thank you for your feedback" message already exists
if (!feedbackContainer.querySelector('.thank-you-message')) {
// Hide all emoji buttons
const emojiButtons = document.querySelectorAll('.emoji-button');
emojiButtons.forEach(function(button) {
button.style.display = 'none'; // Hide the emoji buttons
});
// Show the "Thank you for your feedback" message only once
const thankYouMessage = document.createElement('div');
thankYouMessage.textContent = 'Thank you for your feedback';
thankYouMessage.classList.add('thank-you-message'); // Add a class to identify it
feedbackContainer.appendChild(thankYouMessage);
}
}
}
});
});
//Optional
document.getElementById('OptionalTutorial').addEventListener('click', function() {
const feedbackHTML = `
`;
// Start Intro.js tutorial
introJs().setOptions({
steps: [
{
element: document.querySelector('#open-small-dialog-button'),
intro: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
tooltipClass: 'custom-tooltip',
title: "Title 1",
},
{
element: document.querySelector('#open-medium-dialog-button'),
intro: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
tooltipClass: 'custom-tooltip',
title: "Title 2",
},
{
element: document.querySelector('#open-info-dialog-button'),
intro: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
tooltipClass: 'custom-tooltip',
title: "Title 3",
},
{
title: "How did you like the tour?",
intro: feedbackHTML, // Assign HTML as a string
tooltipClass: 'custom-tooltip mandatory-tutorial'
}
],
showStepNumbers: true,
scrollToElement: true,
positionPrecedence: ["left", "right", "bottom", "top"],
nextLabel: 'Next',
prevLabel: 'Previous',
doneLabel: 'Done',
exitOnOverlayClick: true,
exitOnEsc: true,
showBullets: false,
disableInteraction: true,
}).start();
// Handle emoji button clicks inside the optional tutorial
document.querySelector('body').addEventListener('click', function(event) {
if (event.target && event.target.classList.contains('emoji-button')) {
const feedbackContainer = document.getElementById('feedback-container');
if (feedbackContainer) {
// Check if "Thank you for your feedback" message already exists
if (!feedbackContainer.querySelector('.thank-you-message')) {
const emojiButtons = document.querySelectorAll('.emoji-button');
emojiButtons.forEach(function(button) {
button.style.display = 'none'; // Hide the emoji buttons
});
const thankYouMessage = document.createElement('div');
thankYouMessage.textContent = 'Thank you for your feedback!';
thankYouMessage.classList.add('thank-you-message'); // Add a class to identify it
feedbackContainer.appendChild(thankYouMessage);
}
}
}
});
});
Here is some more detailed information that is initially hidden.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.