Ant Design global message API; shows short messages at the top center. Messages auto-close after a while or can be closed by the user.
| Scenario | Description |
|---|---|
| JSBlock / JSField / JSItem / JSColumn | Quick feedback: validation, copy success, etc. |
| Form actions / event flow | Submit success, save failed, validation failed |
| JSAction | Click or batch action feedback |
MessageInstance is the Ant Design message API.
| Method | Description |
|---|---|
success(content, duration?) | Success message |
error(content, duration?) | Error message |
warning(content, duration?) | Warning message |
info(content, duration?) | Info message |
loading(content, duration?) | Loading (usually closed manually) |
open(config) | Open with custom config |
destroy() | Close all messages |
Parameters:
content: string or ConfigOptionsduration: optional seconds; default 3; 0 = no auto-closeConfigOptions (when content is an object):
| ctx.message | ctx.notification | |
|---|---|---|
| Position | Top center | Top right |
| Use | Short, auto-dismiss | Panel with title/description; can stay longer |
| Typical | Action feedback, validation, copy | Task done, system notice, longer content |