Appearance
Function: message()
ts
function message(ctx: Context, options: MessageOptions): Promise<{
button: string;
}>;Defined in: src/renderer/templates/message.ts:89
Displays a message dialog with optional status indicators.
Shows bubble with icon, subtitle, text, and buttons. Waits for user interaction. Supports Markdown in text fields. Default: Proceed button with value 'ok'.
Parameters
| Parameter | Type | Description |
|---|---|---|
ctx | Context | Render context |
options | MessageOptions | Message configuration |
Returns
Promise<{ button: string; }>
Clicked button value
Examples
ts
import {message} from '@matterway/sdk/UI';
const {button} = await message(ctx, {
title: 'Processing Complete',
subtitle: 'All tasks finished',
text: 'Ready to proceed to next step',
icon: 'circleCheck',
statusList: [
{value: 'success', label: 'Data validated'},
{value: 'warning', label: 'Optional fields empty'}
]
});Usage with callout in text
ts
const {button} = await message(ctx, {
title: 'Action Required',
text: ':::warning\nSome required columns are not visible.\n:::\nPlease ensure all columns are visible before proceeding.',
textAlign: 'left'
});