ComponentsDialog
Dialog
Ask for confirmation in a modal that keeps keyboard focus on the decision.
Setup
Download the shared Inlay assets once. Then choose HTML, React, or Vue and copy the example above.
Wide dialog
Use a wider surface for instructions or a longer decision.
Dialog with a form
Keep a short edit inside the current workspace view.
Scrollable content
Keep the title and actions visible while the middle of the dialog scrolls.
Usage
| Trigger | In React and Vue, DialogRoot connects the trigger and dialog with an instance ID. In HTML, use aria-controls and a unique dialog ID. Place the example outside other forms. |
|---|---|
| Initial focus | Mark the first control with initialFocus in JSX, initial-focus in Vue, or data-ilui-initial-focus in HTML. In this example, focus starts on Keep project. |
| Dismissal | Escape cancels the dialog. DialogClose submits a native dialog form and sets returnValue. The runtime returns focus to the trigger. |
| Application code | Listen for the native close event and inspect returnValue before running your application action. |