Global AI · Design System
Components

Overlays

Modals ask, toasts tell, menus offer. Everything that floats above the page uses one of these three, with a veil or a soft shadow and never a browser dialog.

Confirm modal

Use before anything destructive or hard to undo: cancelling or deleting an event, disabling a member, sending emails. The title and the primary button both name the action ("Cancel event"), and the sentence underneath says exactly what happens.

Do
  • Name the consequence in plain words: "It will become read-only", "This cannot be undone".
  • Label the primary button with the action itself, never "OK", "Yes" or "Confirm" on its own.
  • When the action is a cancel, label the dismiss button "Back" so there are not two "Cancel" buttons.
  • Put the real <form method="post"> (with its anti-forgery token) inside the modal so the submit button posts it.
Don't
  • Ask "Are you sure?" without saying what happens.
  • Confirm routine, easy to undo actions (saving a draft, filtering); just do them and show a toast.
  • Make the destructive button the only way out; Back, the close button and Esc must always work.
CSS: css/framework/modal.css, registration.css (.modal-actions)Razor: Views/My/EventDashboard.cshtml (#confirmEventActionModal), Views/Admin/MemberDetail.cshtml

Confirm before submitting

For a simple "are you sure?" you don't build a modal. Put data-confirm="Question?" on the form (or on one submit button) and js/framework/confirm.js asks in this dialog before the form submits. Destructive wording (delete, remove, cancel, revoke, disable, withdraw, leave) gets the red .btn-danger; set data-confirm-variant to override. The confirm button repeats the submit button's label.

AttributeEffect
data-confirmThe question. On the form, or on a submit button to confirm only that button.
data-confirm-titleDialog title; defaults to "Please confirm".
data-confirm-labelConfirm button label; defaults to the submit button's text.
data-confirm-variantdanger or primary; otherwise picked from the wording.
data-confirm-secondA second question for actions that need two steps.

From script: window.gaicConfirm({ title, message, confirmLabel, danger }).then(function (ok) { ... }).

Do
  • Say what happens and whether it can be undone.
  • Name the action on the submit button ("Delete event"), so the dialog's button names it too.
Don't
  • Call window.confirm(); a test fails on it.
  • Add a page script for confirmations; the framework already handles data-confirm.
JS: js/framework/confirm.js (in the framework bundle)CSS: css/framework/modal.css

Form modal

For one or two optional inputs attached to an action, like a personal note on a batch of emails or a schedule time. If the form needs more than a few fields, validation across steps or a file preview, build a page instead.

Do
  • Give every input a visible <label> and use .field-hint for help text.
  • Add autofocus to the first input when typing is the whole point of the modal.
  • Show server errors in a .reg-errors block with role="alert" inside the modal, above the actions.
Don't
  • Close the modal on submit before the request succeeds; a toast confirms success after the redirect.
  • Use a placeholder as the only label.
CSS: css/framework/modal.css, app.css (.field, .fstack)Razor: Views/My/EventCfp.cshtml (#cfpSendAcceptModal), Views/My/EventMessages.cshtml

Share & option modal

A list of .modal-option rows, each a link with an icon and an arrow. Use it for share targets and calendar providers. The click-out warning for partner events uses the same card with a highlighted destination host.

Do
  • Write each option as a verb plus the destination: "Share on LinkedIn", "Add to Google Calendar".
  • Open external targets with target="_blank" rel="noopener".
  • Give an icon-only trigger an aria-label.
Don't
  • Use brand colours on the option icons; they stay ink and the row warms to cream on hover.
  • Link to a partner event directly; mark it with data-external-event so the click-out warning appears.
CSS: css/framework/modal.css (.modal-option, .external-event-host)Razor: Views/Event/Index.cshtml (#share-modal), Views/Shared/_EventCalendarModal.cshtml, Views/Shared/_ExternalEventModal.cshtml

Toast

A short message at the top of the page after something happened: saved, sent, failed. Set TempData["ToastSuccess"] or TempData["ToastError"] before a redirect and the layout renders it; from script, call window.gaicToast(message, "success" | "error").

Your registration for AgentCon - London is confirmed. Your ticket is on its way.
We couldn't send the reminder. Try again in a minute.
VariantBehaviour
.toast--successGreen edge and tick. Dismisses itself after 30 seconds or on close.
.toast--errorRed (--danger) edge and "!". Stays until the person closes it. Scripted errors get role="alert".
Do
  • Say what happened in one sentence, and for errors what to do next.
  • Use a toast to confirm a modal action after the redirect.
  • Keep the .toast-stack aria-live so screen readers announce it.
Don't
  • Put form validation in a toast only; errors that belong to a field also show next to the form.
  • Add buttons or links to a toast; if the person must act, use a callout or a modal.
CSS: css/framework/toasts.cssJS: js/toasts.jsRazor: Views/Shared/_Toasts.cshtml

Row action menu

The "Actions" dropdown on a table row, for three or more actions on one record. The panel is position: fixed so it escapes the table's scroll clipping; the script places it under its button and flips it up near the bottom of the window.

NameStatusActions
Ada Lovelace
ada@example.com
Pending
Do
  • Keep aria-haspopup and aria-expanded on the toggle; the script updates them.
  • Use .link-btn items, each its own small <form> when it posts.
  • Put the destructive item last and give it .danger; if it can't be undone, open a confirm modal from it.
  • Close on outside click, Esc, scroll and resize.
Don't
  • Use a menu for one or two actions; show them as .btn-sm buttons.
  • Hide the only way to do something important inside a menu.
CSS: css/framework/myarea.css (.row-menu, .link-btn)JS: js/my/row-menu.js (site)Razor: Views/My/EventRegistrations.cshtml, Views/My/EventCfp.cshtml

Map tooltip

The ink card that appears over a world map pin on hover or keyboard focus, showing the event or chapter name and date. world-map.js creates one shared .wm-tip per map; you never write it by hand. Try it on the world map.

AgentCon - LondonTue, Sep 8
Do
  • Keep the SVG <title> on each pin too, so the name is available without hover.
Don't
  • Use tooltips for anything else; the site has no generic tooltip. Explain disabled buttons with a visible hint or a title.
CSS: css/framework/media.css (.wm-tip)JS: js/world-map.js (site)