Dialog
Usage
API
Dialog Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title | String | - | Dialog header title |
| showX | Boolean | false | Show X close button in corner |
| confirmLabel | String | - | Confirm button text |
| rejectLabel | String | - | Reject button text |
| alternateLabel | String | - | Alternate action button text |
| confirmStyle | String | - | "success", "danger", or "" |
| rejectStyle | String | - | "success", "danger", or "" |
| alternateStyle | String | - | "success", "danger", or "" |
| confirmBusy | Boolean | false | Show loading on confirm button |
| confirmActive | Boolean | true | Enable confirm button |
| center | Boolean | false | Center dialog vertically |
| dismissable | Boolean | true | Allow closing via backdrop/ESC |
| zIndex | Number | 2000 | CSS z-index for stacking |
Dialog Slots
| Slot | Description |
|---|---|
| default | Main content area of the dialog body |
| footer | Custom content inside the button bar, between alternate action and confirm/reject buttons |
Dialog Events
| Event | Description |
|---|---|
| confirm | Confirm button clicked |
| reject | Reject button clicked |
| alternate | Alternate button clicked |
| close | Dialog closed (any method) |
Dialog Methods
| Method | Description |
|---|---|
| open() | Open the dialog |
| close() | Close the dialog |
InputDialog Methods
| Method | Returns | Description |
|---|---|---|
| confirm(options) | Promise<Boolean> | Show confirmation dialog |
| prompt(options) | Promise<String|null> | Show input prompt |
| info(options) | Promise | Show info dialog |
| close() | void | Manually close the dialog (use with autoCloseOnConfirm: false) |
InputDialog Options
| Option | Type | Description |
|---|---|---|
| title | String | Dialog title |
| message | String | Array | Message or array of messages for multi-input |
| value | String | Array | Default value(s) |
| type | String | Array | "text", "password", or "number" |
| placeholder | String | Array | Input placeholder(s) |
| required | Boolean | Array | Mark input(s) as required |
| confirmLabel | String | Confirm button text |
| rejectLabel | String | Reject button text |
| confirmStyle | String | Button style |
| autoCloseOnConfirm | Boolean | If false, dialog stays open after confirm (for async workflows). Default: true |
