Message

A brief line of feedback at the top of the screen that goes away on its own, for the result of something the reader just did.

Types

Call info, success, warning, error or loading to show a message with that type's icon and color.

Replace by key

Give a loading message a key and duration: 0, then call success with the same key to swap it in place, or destroy(key) to close it.

Duration

Set duration in seconds to keep a message up for more or less than the default 3, or 0 to keep it until you close it.

Custom icon

Pass icon to replace the type's glyph with your own node, like a filled star for a favorite.

Without an icon

Set classNames: { icon: "hidden" } to show a typed message with no glyph, since icon: null falls back to the default.

With an action

Put a Button in content and close the message by its key, like an Undo link after a file is deleted.

Rich content

Pass any node as content, like an avatar beside a name and a second line of text.

Live progress

Call open again with the same key to update the content in place, here a Progress bar that fills while a file uploads.

In context

The component inside real screens, with the components it usually sits beside.

Save flow

A Save button that shows a loading message while the request runs, swaps it for "Saved", then shows "Backup queued" once that closes.

API Reference

Typed methods
The arguments of success, error, info, warning and loading.
message config
The fields of the config object open() and the typed methods take. Rows marked antuikit in the Version column are added by the kit.
Global config
antd's message.config options. AntuikitProvider sets none, so they keep these defaults.